diff --git a/packages/client/src/i18n/locales/de.ts b/packages/client/src/i18n/locales/de.ts index 4f1ee73..6bd1ec9 100644 --- a/packages/client/src/i18n/locales/de.ts +++ b/packages/client/src/i18n/locales/de.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'Bitte Benutzername und Passwort eingeben', invalidCredentials: 'Ungultiger Benutzername oder Passwort', tooManyAttempts: 'Zu viele fehlgeschlagene Versuche, bitte versuchen Sie es spater erneut', + lockResetHint: 'Wenn dies Ihr Server ist, heben Sie die Login-Sperre auf mit:', + defaultLoginResetHint: 'Um das Standard-Admin-Passwort zuruckzusetzen, fuhren Sie aus:', sessionExpired: 'Die Anmeldung ist abgelaufen. Bitte melden Sie sich erneut an.', accessDenied: 'Sie haben keine Berechtigung fur diese Ressource.', passwordMismatch: 'Passworter stimmen nicht uberein', diff --git a/packages/client/src/i18n/locales/en.ts b/packages/client/src/i18n/locales/en.ts index b2f64b9..6218b40 100644 --- a/packages/client/src/i18n/locales/en.ts +++ b/packages/client/src/i18n/locales/en.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'Please enter username and password', invalidCredentials: 'Invalid username or password', tooManyAttempts: 'Too many failed attempts, please try again later', + lockResetHint: 'If this is your server, clear the login lock with:', + defaultLoginResetHint: 'To reset the default admin password, run:', sessionExpired: 'Login expired. Please sign in again.', accessDenied: 'You do not have permission to access this resource.', passwordMismatch: 'Passwords do not match', diff --git a/packages/client/src/i18n/locales/es.ts b/packages/client/src/i18n/locales/es.ts index 1bd5a46..06d6dff 100644 --- a/packages/client/src/i18n/locales/es.ts +++ b/packages/client/src/i18n/locales/es.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'Por favor, introduzca nombre de usuario y contrasena', invalidCredentials: 'Nombre de usuario o contrasena incorrectos', tooManyAttempts: 'Demasiados intentos fallidos, por favor intente mas tarde', + lockResetHint: 'Si este es su servidor, borre el bloqueo de inicio de sesion con:', + defaultLoginResetHint: 'Para restablecer la contrasena admin predeterminada, ejecute:', sessionExpired: 'La sesion expiro. Inicia sesion de nuevo.', accessDenied: 'No tienes permiso para acceder a este recurso.', passwordMismatch: 'Las contrasenas no coinciden', diff --git a/packages/client/src/i18n/locales/fr.ts b/packages/client/src/i18n/locales/fr.ts index 34fbab7..8f1461f 100644 --- a/packages/client/src/i18n/locales/fr.ts +++ b/packages/client/src/i18n/locales/fr.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'Veuillez entrer le nom d\'utilisateur et le mot de passe', invalidCredentials: 'Nom d\'utilisateur ou mot de passe incorrect', tooManyAttempts: 'Trop de tentatives echouees, veuillez reessayer plus tard', + lockResetHint: 'Si c est votre serveur, supprimez le verrouillage de connexion avec :', + defaultLoginResetHint: 'Pour reinitialiser le mot de passe admin par defaut, executez :', sessionExpired: 'La session a expire. Veuillez vous reconnecter.', accessDenied: 'Vous n\'avez pas l\'autorisation d\'acceder a cette ressource.', passwordMismatch: 'Les mots de passe ne correspondent pas', diff --git a/packages/client/src/i18n/locales/ja.ts b/packages/client/src/i18n/locales/ja.ts index 4e14c27..bfc2b15 100644 --- a/packages/client/src/i18n/locales/ja.ts +++ b/packages/client/src/i18n/locales/ja.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'ユーザー名とパスワードを入力してください', invalidCredentials: 'ユーザー名またはパスワードが正しくありません', tooManyAttempts: 'ログイン試行回数が多すぎます。しばらくしてからお試しください', + lockResetHint: '自分のサーバーの場合は、次のコマンドでログインロックを解除できます:', + defaultLoginResetHint: '既定の admin パスワードをリセットするには、次を実行してください:', sessionExpired: 'ログインの有効期限が切れました。再度ログインしてください。', accessDenied: 'このリソースにアクセスする権限がありません。', passwordMismatch: 'パスワードが一致しません', diff --git a/packages/client/src/i18n/locales/ko.ts b/packages/client/src/i18n/locales/ko.ts index 944caeb..8e00bae 100644 --- a/packages/client/src/i18n/locales/ko.ts +++ b/packages/client/src/i18n/locales/ko.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: '사용자 이름과 비밀번호를 입력해 주세요', invalidCredentials: '사용자 이름 또는 비밀번호가 올바르지 않습니다', tooManyAttempts: '로그인 시도 횟수가 너무 많습니다. 잠시 후 다시 시도해 주세요', + lockResetHint: '본인 서버라면 다음 명령으로 로그인 잠금을 해제할 수 있습니다:', + defaultLoginResetHint: '기본 admin 비밀번호를 재설정하려면 다음을 실행하세요:', sessionExpired: '로그인이 만료되었습니다. 다시 로그인해 주세요.', accessDenied: '이 리소스에 접근할 권한이 없습니다.', passwordMismatch: '비밀번호가 일치하지 않습니다', diff --git a/packages/client/src/i18n/locales/pt.ts b/packages/client/src/i18n/locales/pt.ts index 9fcb80f..20928e9 100644 --- a/packages/client/src/i18n/locales/pt.ts +++ b/packages/client/src/i18n/locales/pt.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: 'Por favor, insira nome de usuario e senha', invalidCredentials: 'Nome de usuario ou senha incorretos', tooManyAttempts: 'Muitas tentativas falhadas, por favor tente novamente mais tarde', + lockResetHint: 'Se este for seu servidor, limpe o bloqueio de login com:', + defaultLoginResetHint: 'Para redefinir a senha admin padrao, execute:', sessionExpired: 'Login expirado. Entre novamente.', accessDenied: 'Voce nao tem permissao para acessar este recurso.', passwordMismatch: 'As senhas nao conferem', diff --git a/packages/client/src/i18n/locales/zh-TW.ts b/packages/client/src/i18n/locales/zh-TW.ts index 662ef16..22816e9 100644 --- a/packages/client/src/i18n/locales/zh-TW.ts +++ b/packages/client/src/i18n/locales/zh-TW.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: '請輸入使用者名稱和密碼', invalidCredentials: '使用者名稱或密碼錯誤', tooManyAttempts: '登入失敗次數過多,請稍後再試', + lockResetHint: '如果這是你的伺服器,可以執行以下命令清除登入鎖定:', + defaultLoginResetHint: '如需重置預設 admin 密碼,可以執行:', sessionExpired: '登入已過期,請重新登入', accessDenied: '你沒有權限存取此資源', passwordMismatch: '兩次密碼不一致', diff --git a/packages/client/src/i18n/locales/zh.ts b/packages/client/src/i18n/locales/zh.ts index e747933..a86f324 100644 --- a/packages/client/src/i18n/locales/zh.ts +++ b/packages/client/src/i18n/locales/zh.ts @@ -16,6 +16,8 @@ export default { credentialsRequired: '请输入用户名和密码', invalidCredentials: '用户名或密码错误', tooManyAttempts: '登录失败次数过多,请稍后重试', + lockResetHint: '如果这是你的服务器,可以执行以下命令清除登录锁定:', + defaultLoginResetHint: '如需重置默认 admin 密码,可以执行:', sessionExpired: '登录已过期,请重新登录', accessDenied: '你没有权限访问该资源', passwordMismatch: '两次密码不一致', diff --git a/packages/client/src/views/LoginView.vue b/packages/client/src/views/LoginView.vue index 47c2447..9f893c4 100644 --- a/packages/client/src/views/LoginView.vue +++ b/packages/client/src/views/LoginView.vue @@ -12,6 +12,7 @@ const username = ref(""); const password = ref(""); const loading = ref(false); const errorMsg = ref(""); +const showLockResetHint = ref(false); // If already has a key, try to go to main page if (hasApiKey()) { @@ -38,6 +39,7 @@ async function handlePasswordLogin() { loading.value = true; errorMsg.value = ""; + showLockResetHint.value = false; try { const sessionToken = await loginWithPassword(username.value.trim(), password.value); @@ -46,6 +48,7 @@ async function handlePasswordLogin() { } catch (err: any) { if (err.status === 429 || err.status === 503) { errorMsg.value = t("login.tooManyAttempts"); + showLockResetHint.value = true; } else { errorMsg.value = err.message || t("login.invalidCredentials"); } @@ -82,6 +85,12 @@ async function handlePasswordLogin() { />
hermes-web-ui clear-login-locks --restart
+ {{ t("login.defaultLoginResetHint") }}
+ hermes-web-ui reset-default-login
+