diff --git a/web/src/components/login/login-form.tsx b/web/src/components/login/login-form.tsx index 0e641c7..b32204f 100644 --- a/web/src/components/login/login-form.tsx +++ b/web/src/components/login/login-form.tsx @@ -34,6 +34,7 @@ export function LoginForm({ } | null>(null) const [captchaToken, setCaptchaToken] = useState(null) const [captchaError, setCaptchaError] = useState(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")} diff --git a/web/src/locales/zh-CN.json b/web/src/locales/zh-CN.json index e6d9081..d880ad3 100644 --- a/web/src/locales/zh-CN.json +++ b/web/src/locales/zh-CN.json @@ -47,6 +47,7 @@ }, "Login": { "captcha_error": "验证错误,请重试。", + "logging": "正在登录...", "welcome": "欢迎回来", "with_oidc": "使用第三方身份提供者", "or_continue_with_local_account": "或使用用户名和密码",