diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx index 0030cdfccd..2aea462d2e 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx @@ -50,15 +50,22 @@ const getResetPasswordForm = (): ISchema => ({ const api = useAPIClient(); const { t } = useAuthTranslation(); const resetToken = new URLSearchParams(window.location.search).get('resetToken'); + const [loading, setLoading] = React.useState(false); return { async run() { await form.submit(); - await api.auth.resetPassword({ ...form.values, resetToken }); + setLoading(true); + try { + await api.auth.resetPassword({ ...form.values, resetToken }); + } finally { + setLoading(false); + } message.success(t("Password reset successful")); setTimeout(() => { window.location.href = '/signin'; }, 1000); }, + loading, }; }, }, diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/de-DE.json b/packages/plugins/@nocobase/plugin-auth/src/locale/de-DE.json index 8006d22601..7c7b00bc7f 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/de-DE.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/de-DE.json @@ -61,5 +61,6 @@ "Go to login": "Zur Anmeldung gehen", "Please enter new password": "Bitte geben Sie ein neues Passwort ein", "Please enter the same password again": "Bitte geben Sie dasselbe Passwort erneut ein", - "The passwords entered twice are inconsistent": "Die zweimal eingegebenen Passwörter stimmen nicht überein" + "The passwords entered twice are inconsistent": "Die zweimal eingegebenen Passwörter stimmen nicht überein", + "Password reset successful": "Passwort zurücksetzen erfolgreich" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-auth/src/locale/en-US.json index 54cffa8499..728add7faa 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/en-US.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/en-US.json @@ -61,5 +61,6 @@ "Go to login": "Go to login", "Please enter new password": "Please enter new password", "Please enter the same password again": "Please enter the same password again", - "The passwords entered twice are inconsistent": "The passwords entered twice are inconsistent" + "The passwords entered twice are inconsistent": "The passwords entered twice are inconsistent", + "Password reset successful": "Password reset successful" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/it-IT.json b/packages/plugins/@nocobase/plugin-auth/src/locale/it-IT.json index ee9ded131d..5b7c725bdc 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/it-IT.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/it-IT.json @@ -66,5 +66,6 @@ "Go to login": "Vai al login", "Please enter new password": "Si prega di inserire una nuova password", "Please enter the same password again": "Si prega di reinserire la stessa password", - "The passwords entered twice are inconsistent": "Le password inserite due volte non corrispondono" + "The passwords entered twice are inconsistent": "Le password inserite due volte non corrispondono", + "Password reset successful": "Reimpostazione password riuscita" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/ja-JP.json b/packages/plugins/@nocobase/plugin-auth/src/locale/ja-JP.json index 455d2b178b..3346de4c5f 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/ja-JP.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/ja-JP.json @@ -38,5 +38,6 @@ "Go to login": "ログインに移動", "Please enter new password": "新しいパスワードを入力してください。", "Please enter the same password again": "同じパスワードを再度入力してください。", - "The passwords entered twice are inconsistent": "2回入力されたパスワードが一致しません" + "The passwords entered twice are inconsistent": "2回入力されたパスワードが一致しません", + "Password reset successful": "パスワードリセット成功" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/ko-KR.json b/packages/plugins/@nocobase/plugin-auth/src/locale/ko-KR.json index c18c380e2e..6b4d9dc303 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/ko-KR.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/ko-KR.json @@ -38,5 +38,6 @@ "Go to login": "로그인으로 가기", "Please enter new password": "새 비밀번호를 입력하세요", "Please enter the same password again": "같은 비밀번호를 다시 입력하세요", - "The passwords entered twice are inconsistent": "입력한 두 개의 비밀번호가 일치하지 않습니다" + "The passwords entered twice are inconsistent": "입력한 두 개의 비밀번호가 일치하지 않습니다", + "Password reset successful": "비밀번호 재설정 성공" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/nl-NL.json b/packages/plugins/@nocobase/plugin-auth/src/locale/nl-NL.json index 8267f2d73f..bec9bf9b01 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/nl-NL.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/nl-NL.json @@ -44,5 +44,6 @@ "Go to login": "Ga naar inloggen", "Please enter new password": "Voer een nieuw wachtwoord in", "Please enter the same password again": "Voer hetzelfde wachtwoord opnieuw in", - "The passwords entered twice are inconsistent": "De twee ingevoerde wachtwoorden zijn inconsistent" + "The passwords entered twice are inconsistent": "De twee ingevoerde wachtwoorden zijn inconsistent", + "Password reset successful": "Wachtwoord opnieuw instellen succesvol" } diff --git a/packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.json index 321e3c75fa..cc982db09b 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.json +++ b/packages/plugins/@nocobase/plugin-auth/src/locale/zh-CN.json @@ -60,5 +60,6 @@ "Go to login": "前往登录", "Please enter new password": "请输入新密码", "Please enter the same password again": "请再次输入相同的密码", - "The passwords entered twice are inconsistent": "两次输入的密码不一致" + "The passwords entered twice are inconsistent": "两次输入的密码不一致", + "Password reset successful": "密码重置成功" }