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
+3 -1
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
/**
* 后台左侧导航栏(Dashboard / 动态 / 作品 / 用户 / 评论 / 联系 / 订阅 / 返回前台)。
* 后台左侧导航栏(Dashboard / 动态 / 作品 / 用户 / 评论 / 联系 / 订阅 / 图片 / 日志 / 返回前台)。
* 高亮当前路由;点击任意导航项时向父级发出 navigate 事件(移动端关闭侧栏)。
*/
import { useRoute } from '#app'
@@ -17,6 +17,8 @@ const items = [
{ to: '/admin/comments', label: '评论管理', icon: 'ph:chat-circle-text' },
{ to: '/admin/contacts', label: '联系留言', icon: 'ph:envelope-simple' },
{ to: '/admin/subscribers', label: '订阅管理', icon: 'ph:paper-plane-tilt' },
{ to: '/admin/uploads', label: '图片管理', icon: 'ph:image' },
{ to: '/admin/audit', label: '操作日志', icon: 'ph:list-checks' },
]
const isActive = (to: string) => route.path === to