feat(profile): add password change and activity filters

Implement password change API and UI in the Account tab
Add secondary filters for contributions, reactions, and comments
Display referral summary in the profile header
This commit is contained in:
2026-05-03 13:52:35 +08:00
parent 0e835f9c03
commit 282481bbcc
8 changed files with 453 additions and 23 deletions

View File

@@ -68,6 +68,7 @@ export const systemWordingMessages = {
accountAccess: 'Trainer Pass',
email: 'Email',
password: 'Password',
currentPassword: 'Current password',
newPassword: 'New password',
confirmPassword: 'Confirm password',
displayName: 'Display name',
@@ -117,7 +118,7 @@ export const systemWordingMessages = {
pages: {
profile: {
title: 'User profile',
subtitle: 'Manage your account display name and email status.',
subtitle: 'Manage your account details, referral, and password.',
loading: 'Loading profile',
accountSummary: 'Account summary',
profileDetails: 'Profile details',
@@ -144,6 +145,20 @@ export const systemWordingMessages = {
tabReactions: 'Reactions',
tabComments: 'Comments',
tabAccount: 'Account',
contributionFiltersLabel: 'Contribution categories',
contributionConfig: 'Config',
contributionsFilterEmpty: 'No contributions in this category',
reactionFiltersLabel: 'Reaction categories',
reactionsFilterEmpty: 'No reactions in this category',
commentFiltersLabel: 'Comment categories',
commentsFilterEmpty: 'No comments in this category',
lifeCommentCategory: 'Life',
discussionCommentCategory: 'Wiki',
passwordTitle: 'Change password',
passwordHint: 'Use at least 8 characters.',
passwordSaved: 'Password updated',
passwordSaveFailed: 'Password update failed',
savePassword: 'Save password',
joinedAt: 'Joined {date}',
lifePosts: 'Life posts',
lifeComments: 'Life comments',
@@ -662,9 +677,11 @@ export const systemWordingMessages = {
emailVerified: 'Email verified',
checkPasswordResetEmail: 'If an account uses this email, a password reset link will be sent.',
passwordResetComplete: 'Password updated. You can log in with the new password.',
passwordChanged: 'Password updated.',
invalidCredentials: 'Email or password is incorrect',
verifyEmailFirst: 'Please complete email verification first',
invalidResetToken: 'The password reset link is invalid or expired',
currentPasswordInvalid: 'Current password is incorrect',
invalidReferralCode: 'Referral code is invalid'
},
validation: {
@@ -823,6 +840,7 @@ export const systemWordingMessages = {
accountAccess: 'Trainer Pass',
email: '邮箱',
password: '密码',
currentPassword: '当前密码',
newPassword: '新密码',
confirmPassword: '确认密码',
displayName: '显示名',
@@ -872,7 +890,7 @@ export const systemWordingMessages = {
pages: {
profile: {
title: '个人资料',
subtitle: '管理账号显示名和邮箱状态。',
subtitle: '管理账号资料、邀请信息和密码。',
loading: '正在加载个人资料',
accountSummary: '账号概览',
profileDetails: '资料详情',
@@ -899,6 +917,20 @@ export const systemWordingMessages = {
tabReactions: '互动',
tabComments: '评论',
tabAccount: '账号',
contributionFiltersLabel: '贡献分类',
contributionConfig: '配置',
contributionsFilterEmpty: '该分类暂无贡献',
reactionFiltersLabel: '互动分类',
reactionsFilterEmpty: '该分类暂无互动',
commentFiltersLabel: '评论分类',
commentsFilterEmpty: '该分类暂无评论',
lifeCommentCategory: 'Life',
discussionCommentCategory: 'Wiki',
passwordTitle: '修改密码',
passwordHint: '至少使用 8 个字符。',
passwordSaved: '密码已更新',
passwordSaveFailed: '密码更新失败',
savePassword: '保存密码',
joinedAt: '加入于 {date}',
lifePosts: 'Life 动态',
lifeComments: 'Life 评论',
@@ -1417,9 +1449,11 @@ export const systemWordingMessages = {
emailVerified: '邮箱已验证',
checkPasswordResetEmail: '如果该邮箱已注册,系统会发送密码重置链接。',
passwordResetComplete: '密码已更新,请使用新密码登录。',
passwordChanged: '密码已更新。',
invalidCredentials: '邮箱或密码不正确',
verifyEmailFirst: '请先完成邮箱验证',
invalidResetToken: '密码重置链接无效或已过期',
currentPasswordInvalid: '当前密码不正确',
invalidReferralCode: '邀请码无效'
},
validation: {