feat(folders): 完善公开文件夹功能 - 添加 /explore 和 /favorites 页面

- 新增 /explore 页面:浏览和搜索公开文件夹
- 新增 /explore/[id] 页面:以只读模式查看公开文件夹
- 新增 /favorites 页面:管理收藏的文件夹
- 重构 /folders 页面:仅显示当前用户的文件夹
- 更新导航栏:添加 Explore 和 Favorites 链接
- 添加 i18n 翻译:explore 和 favorites 相关文本
- 更新 AGENTS.md:添加数据库迁移规范(必须使用 migrate dev)
This commit is contained in:
2026-03-08 14:47:35 +08:00
parent b0fa1a4201
commit d7149366e9
16 changed files with 693 additions and 293 deletions

View File

@@ -132,6 +132,20 @@ pnpm lint # ESLint
pnpm prisma studio # 数据库 GUI
```
### 数据库迁移
**必须使用 `prisma migrate dev`,禁止使用 `db push`**
```bash
# 修改 schema 后创建迁移
DATABASE_URL=your_db_url pnpm prisma migrate dev --name your_migration_name
# 生成 Prisma Client
DATABASE_URL=your_db_url pnpm prisma generate
```
`db push` 会绕过迁移历史,导致生产环境无法正确迁移。
## 备注
- Tailwind CSS v4 (无 tailwind.config.ts)