feat: 写作体验优化 + 封面图 + AI辅助写作 + 博客分页

写作体验优化:
- 自动保存草稿到 localStorage(debounce 2s,刷新不丢内容)
- 浏览器原生全屏专注写作模式
- Markdown 编辑模式(左右分栏,实时预览)
- 快捷键:Ctrl+S / Ctrl+Enter 保存,ESC 退出全屏

封面图功能:
- PostForm 新增封面图 URL 输入 + 实时预览
- BlogList 文章卡片显示封面缩略图
- PostContent 文章详情页显示封面大图

AI 辅助写作:
- OpenAI 兼容接口,SSE 流式返回
- 8 种预设操作:润色、扩写、精简、续写、纠错、翻译、摘要
- 自定义指令输入,结果可复制/替换/追加

其他:
- 后台文章列表改为一页10篇
- 前台 /blog 页面添加分页功能(一页10篇)
This commit is contained in:
胡旭
2026-06-24 15:22:03 +08:00
parent 18e915bcbb
commit 43e1c2f61d
11 changed files with 821 additions and 62 deletions
+1
View File
@@ -23,6 +23,7 @@
"gsap": "^3.15.0",
"lowlight": "^3.3.0",
"lucide-react": "^1.21.0",
"marked": "^18.0.5",
"next": "16.2.9",
"next-themes": "^0.4.6",
"prisma": "5",