diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 1ee86f6..aa8600f 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -1296,6 +1296,10 @@ "Change your account login password": "更改您的账户登录密码", "Disable Account": "禁用账户", "Enable Account": "启用账户", + "Your account has been disabled successfully": "您的账户已成功禁用", + "Failed to disable account": "禁用账户失败", + "Your account has been enabled successfully": "您的账户已成功启用", + "Failed to enable account": "启用账户失败", "Disable your account and stop billing": "禁用您的账户并停止计费", "Enable your account and resume billing": "启用您的账户并恢复计费", "After confirming this action:": "确认此操作后:", @@ -1329,6 +1333,7 @@ "Tip: Password should contain symbols, numbers and uppercase letters": "提示:密码应包含符号、数字和大写字母", "Password updated successfully": "密码更新成功", "Your password has been updated": "您的密码已更新", + "Profile updated successfully": "个人资料更新成功", "Current password is incorrect": "当前密码不正确", "Setting you as a developer...": "正在将您设置为开发者...", "You can now publish apps to our marketplace": "您现在可以在我们的应用市场发布应用了", @@ -1357,5 +1362,23 @@ "Failed to disable two-factor authentication": "禁用双因素认证失败", "Failed to load QR code": "加载二维码失败", "Enabling two-factor authentication...": "正在启用双因素认证...", - "Disabling two-factor authentication...": "正在禁用双因素认证..." + "Disabling two-factor authentication...": "正在禁用双因素认证...", + "Tell us why you are leaving": "告诉我们您离开的原因", + "By sharing your thoughts, help us improve your experience.": "通过分享您的想法,帮助我们改善您的体验。", + "Please rate your experience": "请评价您的体验", + "Select a reason": "选择一个原因", + "The reason I am leaving Jingrow is...": "我离开 Jingrow 的原因是...", + "我要迁移到其他产品": "我要迁移到其他产品", + "我只是在探索这个产品": "我只是在探索这个产品", + "我更喜欢自己托管实例": "我更喜欢自己托管实例", + "已将站点迁移到另一个Jingrow账户": "已将站点迁移到另一个Jingrow账户", + "我不喜欢Jingrow的体验": "我不喜欢Jingrow的体验", + "Jingrow对我来说太贵了": "Jingrow对我来说太贵了", + "支付问题": "支付问题", + "缺少功能": "缺少功能", + "我的原因不在此列表中": "我的原因不在此列表中", + "请选择一个原因": "请选择一个原因", + "请评价您的体验": "请评价您的体验", + "请简要说明原因": "请简要说明原因", + "Your feedback has been submitted successfully": "您的反馈已成功提交" } diff --git a/src/shared/api/account.ts b/src/shared/api/account.ts index d9ddc92..3c24053 100644 --- a/src/shared/api/account.ts +++ b/src/shared/api/account.ts @@ -291,7 +291,7 @@ export const disableAccount = async (totpCode?: string): Promise<{ success: bool try { const response = await axios.post( `/api/action/jcloud.api.account.disable_account`, - totpCode ? { totp_code: totpCode } : {}, + { totp_code: totpCode || null }, { headers: get_session_api_headers(), withCredentials: true @@ -552,3 +552,30 @@ export const disable2FA = async (totpCode: string): Promise<{ success: boolean; } } } + +// 提交反馈 +export const submitFeedback = async (team: string, message: string, note: string, rating: number, route?: string): Promise<{ success: boolean; message?: string }> => { + try { + const response = await axios.post( + `/api/action/jcloud.api.account.feedback`, + { + team, + message, + note, + rating, + route: route || null + }, + { + headers: get_session_api_headers(), + withCredentials: true + } + ) + + return { success: true, message: response.data?.message || '反馈已提交' } + } catch (error: any) { + return { + success: false, + message: error.response?.data?.detail || error.response?.data?.message || error.message || '提交反馈失败' + } + } +} diff --git a/src/views/settings/Settings.vue b/src/views/settings/Settings.vue index 357315e..a8a3317 100644 --- a/src/views/settings/Settings.vue +++ b/src/views/settings/Settings.vue @@ -820,6 +820,85 @@
{{ t('Do you want to continue?') }}
+ + ++ {{ t('By sharing your thoughts, help us improve your experience.') }} +
+ + +