mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
feat: 添加登录状态提示,优化用户登录体验
This commit is contained in:
@ -34,6 +34,7 @@ export function LoginForm({
|
||||
} | null>(null)
|
||||
const [captchaToken, setCaptchaToken] = useState<string | null>(null)
|
||||
const [captchaError, setCaptchaError] = useState<string | null>(null)
|
||||
const [isLogging, setIsLogging] = useState(false)
|
||||
const [refreshCaptchaKey, setRefreshCaptchaKey] = useState(0)
|
||||
const [{ username, password }, setCredentials] = useState({ username: '', password: '' })
|
||||
const router = useRouter()
|
||||
@ -164,9 +165,9 @@ export function LoginForm({
|
||||
type="submit"
|
||||
className="w-full"
|
||||
onClick={handleLogin}
|
||||
disabled={!captchaToken}
|
||||
disabled={!captchaToken || isLogging}
|
||||
>
|
||||
{t("login")}
|
||||
{isLogging ? t("logging") : t("login")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user