♻️ refactor(personal-settings): Break down PersonalSetting.js into modular components

- Split the 1554-line PersonalSetting.js file into smaller, maintainable components
- Created organized folder structure under personal/:
  - components/: UserInfoHeader for shared user info display
  - tabs/: ModelsList, AccountBinding, SecuritySettings, NotificationSettings
  - modals/: EmailBindModal, WeChatBindModal, AccountDeleteModal, ChangePasswordModal
- Refactored main PersonalSetting component to use composition pattern
- Improved code maintainability and separation of concerns
- Added collapsible prop to ModelsList tabs for better UX
- Fixed import path for TwoFASetting component in SecuritySettings
- Preserved all existing functionality and user interactions

This refactoring reduces the main file from 1554 to 484 lines and makes
the codebase more modular, testable, and easier to maintain.
This commit is contained in:
t0ng7u
2025-08-17 00:49:54 +08:00
parent a1cab158ea
commit 9805d35a5d
11 changed files with 1629 additions and 1266 deletions

View File

@@ -1691,7 +1691,7 @@
"暂无监控数据": "No monitoring data",
"IP记录": "IP Record",
"记录请求与错误日志 IP": "Record request and error log IP",
"开启后,仅“消费”和“错误”日志将记录您的客户端 IP 地址": "After enabling, only \"consumption\" and \"error\" logs will record your client IP address",
"开启后,仅\"消费\"和\"错误\"日志将记录您的客户端IP地址": "After enabling, only \"consumption\" and \"error\" logs will record your client IP address",
"只有当用户设置开启IP记录时才会进行请求和错误类型日志的IP记录": "Only when the user sets IP recording, the IP recording of request and error type logs will be performed",
"设置保存成功": "Settings saved successfully",
"设置保存失败": "Settings save failed",
@@ -1973,5 +1973,19 @@
"禁用2FA失败": "Failed to disable 2FA",
"备用码重新生成成功": "Backup codes regenerated successfully",
"重新生成备用码失败": "Failed to regenerate backup codes",
"备用码已复制到剪贴板": "Backup codes copied to clipboard"
"备用码已复制到剪贴板": "Backup codes copied to clipboard",
"账户管理": "Account management",
"账户绑定、安全设置和身份验证": "Account binding, security settings and identity verification",
"通知、价格和隐私相关设置": "Notification, price and privacy related settings",
"通知配置": "Notification configuration",
"只支持HTTPS系统将以POST方式发送通知请确保地址可以接收POST请求": "Only HTTPS is supported, the system will send notifications via POST, please ensure that the address can receive POST requests",
"密钥将以Bearer方式添加到请求头中用于验证webhook请求的合法性": "The key will be added to the request header as Bearer to verify the legitimacy of the webhook request",
"Webhook请求结构说明": "Webhook request structure description",
"通知类型 (quota_exceed: 额度预警)": "Notification type (quota_exceed: quota warning)",
"通知标题": "Notification title",
"通知内容,支持 {{value}} 变量占位符": "Notification content, supports {{value}} variable placeholders",
"按顺序替换content中的变量占位符": "Replace variable placeholders in content in order",
"Unix时间戳": "Unix timestamp",
"隐私设置": "Privacy settings",
"记录请求与错误日志IP": "Record request and error log IP"
}