Commit Graph
30 Commits
Author SHA1 Message Date
bwstudio 45137c2f4f fix: 详情页「返回首页」改为「返回」,保留前页筛选/分页状态
- 使用 router.back() 返回上一页,保留 URL 参数(分类筛选、页码等)
- 无历史记录时兜底跳转首页
- 图标改为 🔙
2026-06-11 20:53:55 +08:00
bwstudio 8571066931 fix: 翻页后自动滚动到顶部,确保用户看到筛选信息栏 2026-06-11 20:41:25 +08:00
bwstudio 0a85f99d3a fix: 修复左侧大屏 AppSidebar 点击分类无响应
- 左侧大屏侧边栏 @selectType 处理器从空函数改为 handleSelectType
- 之前点击左侧分类列表无任何反应,现已修复
2026-06-11 20:22:58 +08:00
bwstudio fde86b90d2 feat: 新增点踩功能,列表卡片和详情页支持 👍/👎 投票
- 后端: 新增 dislike_count 字段(模型/Schema/数据库迁移)
- 后端: 新增 POST /api/jokes/{id}/dislike 端点
- 后端: 管理后台统计新增 total_dislikes
- 前端: 新增 useVote 组合函数(localStorage 持久化防重复)
- 前端: JokeCard 列表卡片新增 👍/👎 可点击投票按钮
- 前端: 详情页 ❤️ 改为 👍 赞一下 / 👎 踩一脚 双按钮
2026-06-11 19:17:12 +08:00
bwstudio b5194c4965 fix: 修复 AppSidebar 组件未导入导致 prop 序列化错误,大屏幕隐藏副导航避免内容重复
- 添加缺失的 AppSidebar import(修复 types prop 显示为 [object Object] 的问题)
- 大屏幕(≥1200px)隐藏 AppSubNav,避免与 AppSidebar 分类列表重复
- 移除布局调试代码(调试条、updateLayoutInfo、调试 CSS)
2026-06-11 08:12:21 +08:00
bwstudio 1eeadb815b fix: 1024px+ 屏幕填满,去除居中空白 2026-06-10 22:06:08 +08:00
bwstudio 0009aa7e88 fix: 超宽屏填满屏幕,去除左侧空白 2026-06-10 21:41:25 +08:00
bwstudio f0b07bd854 fix: 分类筛选改为单选(手机端操作优化) 2026-06-10 19:46:53 +08:00
bwstudio e203305bac fix: 修复移动端副导航栏未隐藏的问题 2026-06-10 08:24:47 +08:00
bwstudio c55d883524 feat(web): 优化前台移动端适配
- 添加响应式 CSS 变量断点系统
- 移动端(<768px):单列布局,汉堡菜单
- 平板(768-1200px):显示副导航
- 桌面(1200px+):完整三栏布局
- 主页网格使用 auto-fill 自适应列数
- 详情页按钮垂直堆叠显示
- 添加移动端抽屉式分类导航
2026-06-10 07:43:59 +08:00
bwstudio 595394fcb7 feat: 前后台静态资源路径冲突修复 + 用户管理功能
- 修改 admin/vite.config.js 添加 base: '/admin/' 解决静态资源路径问题
- 修复后台 index.html 资源引用从 /assets/ → /admin/assets/
- 更新优化器默认 API 地址为服务器地址
- 添加友链管理相关代码
- 修复多处分类管理页面
2026-06-10 07:30:49 +08:00
bwstudioandClaude Opus 4.8 aecf1f1f15 feat: add user role system and public joke submission API
- Add AdminUser role field (admin/submitter)
- User management in admin panel
- Public joke submission API (no auth required)
- Document submission methods for external workers

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:48:35 +08:00
bwstudio ceed63fcb0 fix: resolve 10 code review issues
High priority:
- Fix concurrent race condition for view_count/like_count (atomic update)
- Add route request ID tracking to prevent race conditions
- Filter get_joke by status=approved (no pending content leak)
- Add error feedback for like button

Performance:
- Optimize random joke query (avoid full table sort)
- Limit page_size max to 100 (DoS prevention)

Medium:
- Add localStorage quota error handling
- Handle empty AI response gracefully
- Fix generate content title extraction

Low:
- Add rejected_jokes to stats API
- Update dashboard to show rejected count
2026-06-02 20:35:08 +08:00
bwstudio 0b43973236 feat(admin): convert sidebar to multi-level menu structure 2026-06-02 20:17:25 +08:00
bwstudio 12426d8478 docs: add /api/generate to API docs 2026-06-02 20:04:00 +08:00
bwstudio bec6f50182 feat(web): add AI joke generator page with favorites 2026-06-02 20:03:37 +08:00
bwstudio 69670eb402 feat(web): add AI generate button to header nav 2026-06-02 20:01:50 +08:00
bwstudio a233cab970 feat(web): add /generate route 2026-06-02 20:01:17 +08:00
bwstudio 93c12edefc feat(web): add generateJoke API function 2026-06-02 20:00:57 +08:00
bwstudio f28c413351 feat(api): add joke generate endpoint with AI 2026-06-02 20:00:41 +08:00
bwstudio 0892e6aa04 feat(api): add GenerateRequest/GenerateResponse schemas 2026-06-02 19:56:35 +08:00
bwstudio 4651781bc3 fix(api): use bcrypt directly instead of passlib for compatibility 2026-05-21 22:18:36 +08:00
bwstudio 7f51d200f1 fix: move admin and web to correct locations 2026-05-21 21:45:31 +08:00
bwstudio 89fa43d5fa feat(admin): add Vue3 admin frontend 2026-05-21 21:34:09 +08:00
bwstudio 621a239af5 feat(api): add database init script 2026-05-21 21:11:37 +08:00
bwstudioandClaude Opus 4.7 c3a8e3e311 feat(api): implement FastAPI routes with JWT authentication
- jokes.py: Public joke listing, detail, and random endpoints
- categories.py: Type and crowd listing endpoints
- auth.py: Login endpoint with JWT token generation
- admin.py: Full CRUD for jokes, types, crowds with JWT protection
- Fix request body schemas to use Create DTOs instead of Response models

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 21:02:59 +08:00
bwstudioandClaude Opus 4.7 d59474f0a6 fix(api): export base schema classes from __init__.py
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 20:48:58 +08:00
bwstudio 29e06517cb feat(api): add Pydantic schemas 2026-05-21 20:45:41 +08:00
bwstudio 16baff934a feat(api): add database models 2026-05-21 20:41:45 +08:00
bwstudio 57245cc288 feat(api): project initialization 2026-05-21 20:39:14 +08:00