From e3c05e76483b07cf61cd9bd08cdd18b429efc85d Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Mon, 4 Aug 2025 20:12:19 +0800 Subject: [PATCH] feat: add reset password button in user page (#1742) --- apps/readest-app/public/locales/ar/translation.json | 5 +++-- apps/readest-app/public/locales/de/translation.json | 5 +++-- apps/readest-app/public/locales/el/translation.json | 5 +++-- apps/readest-app/public/locales/es/translation.json | 5 +++-- apps/readest-app/public/locales/fr/translation.json | 5 +++-- apps/readest-app/public/locales/hi/translation.json | 5 +++-- apps/readest-app/public/locales/id/translation.json | 5 +++-- apps/readest-app/public/locales/it/translation.json | 5 +++-- apps/readest-app/public/locales/ja/translation.json | 5 +++-- apps/readest-app/public/locales/ko/translation.json | 5 +++-- apps/readest-app/public/locales/nl/translation.json | 5 +++-- apps/readest-app/public/locales/pl/translation.json | 5 +++-- apps/readest-app/public/locales/pt/translation.json | 5 +++-- apps/readest-app/public/locales/ru/translation.json | 5 +++-- apps/readest-app/public/locales/th/translation.json | 5 +++-- apps/readest-app/public/locales/tr/translation.json | 5 +++-- apps/readest-app/public/locales/uk/translation.json | 5 +++-- apps/readest-app/public/locales/vi/translation.json | 5 +++-- apps/readest-app/public/locales/zh-CN/translation.json | 5 +++-- apps/readest-app/public/locales/zh-TW/translation.json | 5 +++-- .../src/app/user/components/AccountActions.tsx | 8 ++++++++ apps/readest-app/src/app/user/page.tsx | 7 ++++++- apps/readest-app/src/utils/nav.ts | 7 +++++++ 23 files changed, 81 insertions(+), 41 deletions(-) diff --git a/apps/readest-app/public/locales/ar/translation.json b/apps/readest-app/public/locales/ar/translation.json index d560a864..0f9f4096 100644 --- a/apps/readest-app/public/locales/ar/translation.json +++ b/apps/readest-app/public/locales/ar/translation.json @@ -477,5 +477,6 @@ "Terms of Service": "شروط الخدمة", "Privacy Policy": "سياسة الخصوصية", "Disable Double Click": "تعطيل النقر المزدوج", - "TTS not supported for this document": "تكنولوجيا تحويل النص إلى كلام غير مدعومة لهذا المستند." -} + "TTS not supported for this document": "تكنولوجيا تحويل النص إلى كلام غير مدعومة لهذا المستند.", + "Reset Password": "إعادة تعيين" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/de/translation.json b/apps/readest-app/public/locales/de/translation.json index 1e5ec9b5..6b356f2f 100644 --- a/apps/readest-app/public/locales/de/translation.json +++ b/apps/readest-app/public/locales/de/translation.json @@ -461,5 +461,6 @@ "Terms of Service": "Allgemeine Geschäftsbedingungen", "Privacy Policy": "Datenschutzbestimmungen", "Disable Double Click": "Doppelklick deaktivieren", - "TTS not supported for this document": "TTS wird für dieses Dokument nicht unterstützt" -} + "TTS not supported for this document": "TTS wird für dieses Dokument nicht unterstützt", + "Reset Password": "Passwort zurücksetzen" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/el/translation.json b/apps/readest-app/public/locales/el/translation.json index a815d10c..92f3316d 100644 --- a/apps/readest-app/public/locales/el/translation.json +++ b/apps/readest-app/public/locales/el/translation.json @@ -461,5 +461,6 @@ "Terms of Service": "Όροι χρήσης", "Privacy Policy": "Πολιτική απορρήτου", "Disable Double Click": "Απενεργοποίηση διπλού κλικ", - "TTS not supported for this document": "Η τεχνολογία TTS δεν υποστηρίζεται για αυτό το έγγραφο." -} + "TTS not supported for this document": "Η τεχνολογία TTS δεν υποστηρίζεται για αυτό το έγγραφο.", + "Reset Password": "Επαναφορά κωδικού" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/es/translation.json b/apps/readest-app/public/locales/es/translation.json index a734be78..44b01f92 100644 --- a/apps/readest-app/public/locales/es/translation.json +++ b/apps/readest-app/public/locales/es/translation.json @@ -465,5 +465,6 @@ "Terms of Service": "Condiciones del servicio", "Privacy Policy": "Política de privacidad", "Disable Double Click": "Deshabilitar Doble Clic", - "TTS not supported for this document": "TTS no es compatible con este documento." -} + "TTS not supported for this document": "TTS no es compatible con este documento.", + "Reset Password": "Restablecer contraseña" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/fr/translation.json b/apps/readest-app/public/locales/fr/translation.json index 7948f9be..364f2030 100644 --- a/apps/readest-app/public/locales/fr/translation.json +++ b/apps/readest-app/public/locales/fr/translation.json @@ -465,5 +465,6 @@ "Terms of Service": "Conditions d'utilisation", "Privacy Policy": "Politique de confidentialité", "Disable Double Click": "Désactiver le double-clic", - "TTS not supported for this document": "TTS non pris en charge pour ce document" -} + "TTS not supported for this document": "TTS non pris en charge pour ce document", + "Reset Password": "Nouveau mot de passe" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/hi/translation.json b/apps/readest-app/public/locales/hi/translation.json index 3e1cce1d..dab6b076 100644 --- a/apps/readest-app/public/locales/hi/translation.json +++ b/apps/readest-app/public/locales/hi/translation.json @@ -461,5 +461,6 @@ "Terms of Service": "सेवा की शर्तें", "Privacy Policy": "गोपनीयता नीति", "Disable Double Click": "डबल क्लिक अक्षम करें", - "TTS not supported for this document": "TTS इस दस्तावेज़ के लिए समर्थित नहीं है" -} + "TTS not supported for this document": "TTS इस दस्तावेज़ के लिए समर्थित नहीं है", + "Reset Password": "पासवर्ड रीसेट करें" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/id/translation.json b/apps/readest-app/public/locales/id/translation.json index ca7e306f..0b955f2a 100644 --- a/apps/readest-app/public/locales/id/translation.json +++ b/apps/readest-app/public/locales/id/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "Ketentuan Layanan", "Privacy Policy": "Kebijakan Privasi", "Disable Double Click": "Nonaktifkan Klik Ganda", - "TTS not supported for this document": "TTS tidak didukung untuk dokumen ini" -} + "TTS not supported for this document": "TTS tidak didukung untuk dokumen ini", + "Reset Password": "Reset Kata Sandi" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/it/translation.json b/apps/readest-app/public/locales/it/translation.json index ee79970b..74da919d 100644 --- a/apps/readest-app/public/locales/it/translation.json +++ b/apps/readest-app/public/locales/it/translation.json @@ -465,5 +465,6 @@ "Terms of Service": "Termini di servizio", "Privacy Policy": "Informativa sulla privacy", "Disable Double Click": "Disabilita Doppio Clic", - "TTS not supported for this document": "TTS non supportato per questo documento" -} + "TTS not supported for this document": "TTS non supportato per questo documento", + "Reset Password": "Reimposta Password" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/ja/translation.json b/apps/readest-app/public/locales/ja/translation.json index d2675394..24ac334c 100644 --- a/apps/readest-app/public/locales/ja/translation.json +++ b/apps/readest-app/public/locales/ja/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "利用規約", "Privacy Policy": "プライバシーポリシー", "Disable Double Click": "ダブルクリック無効", - "TTS not supported for this document": "TTSはこのドキュメントではサポートされていません" -} + "TTS not supported for this document": "TTSはこのドキュメントではサポートされていません", + "Reset Password": "パスワードをリセット" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/ko/translation.json b/apps/readest-app/public/locales/ko/translation.json index 3f41fe11..6a2e36f0 100644 --- a/apps/readest-app/public/locales/ko/translation.json +++ b/apps/readest-app/public/locales/ko/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "서비스 약관", "Privacy Policy": "개인정보 보호정책", "Disable Double Click": "더블 클릭 비활성화", - "TTS not supported for this document": "TTS가 이 문서에서 지원되지 않습니다" -} + "TTS not supported for this document": "TTS가 이 문서에서 지원되지 않습니다", + "Reset Password": "비밀번호 재설정" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/nl/translation.json b/apps/readest-app/public/locales/nl/translation.json index 78d893de..cc269574 100644 --- a/apps/readest-app/public/locales/nl/translation.json +++ b/apps/readest-app/public/locales/nl/translation.json @@ -461,5 +461,6 @@ "Terms of Service": "Gebruiksvoorwaarden", "Privacy Policy": "Privacybeleid", "Disable Double Click": "Dubbelklikken uitschakelen", - "TTS not supported for this document": "TTS niet ondersteund voor dit document" -} + "TTS not supported for this document": "TTS niet ondersteund voor dit document", + "Reset Password": "Wachtwoord resetten" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/pl/translation.json b/apps/readest-app/public/locales/pl/translation.json index 029f12ab..0e7e2c32 100644 --- a/apps/readest-app/public/locales/pl/translation.json +++ b/apps/readest-app/public/locales/pl/translation.json @@ -469,5 +469,6 @@ "Terms of Service": "Warunki korzystania z usługi", "Privacy Policy": "Polityka prywatności", "Disable Double Click": "Wyłącz podwójne kliknięcie", - "TTS not supported for this document": "TTS nie jest obsługiwane dla tego dokumentu" -} + "TTS not supported for this document": "TTS nie jest obsługiwane dla tego dokumentu", + "Reset Password": "Zresetuj hasło" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/pt/translation.json b/apps/readest-app/public/locales/pt/translation.json index ebc0597c..28811b56 100644 --- a/apps/readest-app/public/locales/pt/translation.json +++ b/apps/readest-app/public/locales/pt/translation.json @@ -465,5 +465,6 @@ "Terms of Service": "Termos de Serviço", "Privacy Policy": "Política de Privacidade", "Disable Double Click": "Desativar Clique Duplo", - "TTS not supported for this document": "TTS não suportado para este documento" -} + "TTS not supported for this document": "TTS não suportado para este documento", + "Reset Password": "Redefinir Senha" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/ru/translation.json b/apps/readest-app/public/locales/ru/translation.json index 7fb464b0..ad2715c2 100644 --- a/apps/readest-app/public/locales/ru/translation.json +++ b/apps/readest-app/public/locales/ru/translation.json @@ -469,5 +469,6 @@ "Terms of Service": "Условия использования", "Privacy Policy": "Политика конфиденциальности", "Disable Double Click": "Отключить двойной клик", - "TTS not supported for this document": "TTS не поддерживается для этого документа" -} + "TTS not supported for this document": "TTS не поддерживается для этого документа", + "Reset Password": "Сбросить пароль" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/th/translation.json b/apps/readest-app/public/locales/th/translation.json index 62b707cf..a57e1a30 100644 --- a/apps/readest-app/public/locales/th/translation.json +++ b/apps/readest-app/public/locales/th/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "ข้อกำหนดในการให้บริการ", "Privacy Policy": "นโยบายความเป็นส่วนตัว", "Disable Double Click": "ปิดการคลิกสองครั้ง", - "TTS not supported for this document": "ไม่รองรับ TTS สำหรับเอกสารนี้" -} + "TTS not supported for this document": "ไม่รองรับ TTS สำหรับเอกสารนี้", + "Reset Password": "รีเซ็ตพาสเวิร์ด" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/tr/translation.json b/apps/readest-app/public/locales/tr/translation.json index 7581044c..dd55081b 100644 --- a/apps/readest-app/public/locales/tr/translation.json +++ b/apps/readest-app/public/locales/tr/translation.json @@ -461,5 +461,6 @@ "Terms of Service": "Hizmet Şartları", "Privacy Policy": "Gizlilik Politikası", "Disable Double Click": "Çift Tıklamayı Devre Dışı Bırak", - "TTS not supported for this document": "TTS bu belge için desteklenmiyor" -} + "TTS not supported for this document": "TTS bu belge için desteklenmiyor", + "Reset Password": "Şifreyi Sıfırla" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/uk/translation.json b/apps/readest-app/public/locales/uk/translation.json index 8dab6141..519ae828 100644 --- a/apps/readest-app/public/locales/uk/translation.json +++ b/apps/readest-app/public/locales/uk/translation.json @@ -469,5 +469,6 @@ "Terms of Service": "Умови обслуговування", "Privacy Policy": "Політика конфіденційності", "Disable Double Click": "Вимкнути подвійне клацання", - "TTS not supported for this document": "TTS не підтримується для цього документа" -} + "TTS not supported for this document": "TTS не підтримується для цього документа", + "Reset Password": "Скинути пароль" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/vi/translation.json b/apps/readest-app/public/locales/vi/translation.json index e3f95485..884121a8 100644 --- a/apps/readest-app/public/locales/vi/translation.json +++ b/apps/readest-app/public/locales/vi/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "Điều khoản dịch vụ", "Privacy Policy": "Chính sách bảo mật", "Disable Double Click": "Tắt Nhấp Đôi", - "TTS not supported for this document": "TTS không được hỗ trợ cho tài liệu này" -} + "TTS not supported for this document": "TTS không được hỗ trợ cho tài liệu này", + "Reset Password": "Đặt lại mật khẩu" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/zh-CN/translation.json b/apps/readest-app/public/locales/zh-CN/translation.json index 3a8c64b7..82ee4150 100644 --- a/apps/readest-app/public/locales/zh-CN/translation.json +++ b/apps/readest-app/public/locales/zh-CN/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "服务条款", "Privacy Policy": "隐私政策", "Disable Double Click": "禁用双击", - "TTS not supported for this document": "TTS 不支持此文档" -} + "TTS not supported for this document": "TTS 不支持此文档", + "Reset Password": "重置密码" +} \ No newline at end of file diff --git a/apps/readest-app/public/locales/zh-TW/translation.json b/apps/readest-app/public/locales/zh-TW/translation.json index 89fffb2b..d37abf14 100644 --- a/apps/readest-app/public/locales/zh-TW/translation.json +++ b/apps/readest-app/public/locales/zh-TW/translation.json @@ -457,5 +457,6 @@ "Terms of Service": "服務條款", "Privacy Policy": "隱私政策", "Disable Double Click": "禁用雙擊", - "TTS not supported for this document": "TTS 不支援此文件" -} + "TTS not supported for this document": "TTS 不支援此文件", + "Reset Password": "重設密碼" +} \ No newline at end of file diff --git a/apps/readest-app/src/app/user/components/AccountActions.tsx b/apps/readest-app/src/app/user/components/AccountActions.tsx index bf27a654..b721e86f 100644 --- a/apps/readest-app/src/app/user/components/AccountActions.tsx +++ b/apps/readest-app/src/app/user/components/AccountActions.tsx @@ -48,6 +48,7 @@ const DeleteConfirmationModal: React.FC = ({ interface AccountActionsProps { userPlan: UserPlan; onLogout: () => void; + onResetPassword: () => void; onConfirmDelete: () => void; onRestorePurchase?: () => void; onManageSubscription?: () => void; @@ -56,6 +57,7 @@ interface AccountActionsProps { const AccountActions: React.FC = ({ userPlan, onLogout, + onResetPassword, onConfirmDelete, onRestorePurchase, onManageSubscription, @@ -100,6 +102,12 @@ const AccountActions: React.FC = ({ ) )} +