feat: 收官补齐全部未实现功能

- 账号体系:修改密码(/account + PATCH /api/auth/password)、自助删除账号
  (DELETE /api/auth/me)、订阅退订(token + /unsubscribe 页)
- 前台/SEO:RSS 订阅 /feed.xml、作品详情分享、canonical URL、
  文章 Article JSON-LD、品牌化错误页(i18n)
- 后台增强:图片管理 /admin/uploads、操作审计日志 /admin/audit(含清空)、
  联系消息已读标记、评论列表分页
- 工程:vitest 测试(密码哈希/内容校验器/种子完整性,12 例)+ pnpm test
- DB 迁移:contacts.read、subscribers.token、audit_logs(老库 ALTER 兼容)
- 密码逻辑抽为 server/utils/password.ts 供测试
This commit is contained in:
2026-08-06 17:26:26 +08:00
parent d67849a311
commit 685c7b51d1
47 changed files with 1600 additions and 72 deletions
+40 -1
View File
@@ -427,7 +427,30 @@
"delivered": "Delivered to inbox",
"notDelivered": "Not delivered (SMTP not configured)"
},
"adminEntry": "Admin Panel"
"adminEntry": "Admin Panel",
"changePassword": {
"title": "Change Password",
"currentPassword": "Current Password",
"newPassword": "New Password",
"confirmPassword": "Confirm New Password",
"submit": "Update Password",
"saving": "Updating...",
"success": "Password updated",
"failed": "Failed to update password",
"wrongPassword": "Current password is incorrect",
"tooShort": "New password must be at least 8 characters",
"mismatch": "Passwords do not match"
},
"deleteAccount": {
"title": "Delete Account",
"hint": "This cannot be undone. Your comments and favorites will be removed.",
"passwordPlaceholder": "Enter your password to confirm",
"confirmButton": "Delete",
"cancelButton": "Cancel",
"success": "Account deleted",
"wrongPassword": "Incorrect password",
"confirmText": "Delete your account permanently? This cannot be undone."
}
},
"comments": {
"title": "Comments",
@@ -466,5 +489,21 @@
"subscribed": "Subscribed! Thank you for joining.",
"alreadySubscribed": "You are already subscribed",
"error": "Subscription failed. Please try again."
},
"error": {
"title": "Something went wrong",
"notFound": "Page not found",
"serverError": "Server error",
"generic": "An error occurred",
"backHome": "Back to Home"
},
"unsubscribe": {
"title": "Unsubscribe",
"description": "Unsubscribe from ArcticNewOne newsletter:",
"unsubscribe": "Unsubscribe",
"unsubscribed": "You've been unsubscribed. Thanks for following along!",
"already": "This address is no longer subscribed.",
"invalid": "The unsubscribe link is invalid or has expired.",
"backHome": "Back to Home"
}
}