4 Commits

Author SHA1 Message Date
iye
8b99c2f091 feat: 跨设备同步 + Logo v3 + 导航合并 + 窄屏适配 (v0.3.4)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m44s
- useSyncMe: 登录后拉 /api/me 用 votedArtists 覆盖本地 store,登出清本地
- Providers: SyncMeBridge 接入 SessionProvider
- Logo v3 替换登录页/弹窗/Footer 的旧 <Logo> 组件
- Footer 删除 logo,简化为版权行
- Navigation 删除 mobile 第二行 NavLinks,合并到第一行
- NavLinks 统一布局,响应式 gap+字号(gap-5 sm:gap-8 / text-[13px] sm:text-sm)
- HeroVoteProgress 窄屏(< md)隐藏 12 格点,只留文字
- scripts/screenshot-narrow.mjs 验证脚本(可配宽高)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 14:56:42 +08:00
iye
51009616a1 fix(home): Top12 出道位接 /api/ranking 显示真实票数
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 6m29s
- 首页 Top12Bar 之前只读 zustand store(初始 0 票),未登录访客永远看到"Awaiting Votes"
- 现在和 /ranking 页一样用 useRanking 30s 轮询,merge 服务端票数到本地 store(取 max)
- 与本地乐观投票兼容,投票后立即可见

bump to v0.3.2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 14:03:51 +08:00
iye
e05f63b94f chore(scripts): 补提交 reset-vote-data.mjs(清 DB 工具)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m24s
清空 votes / fan_supports / daily_quota / sign_ins / risk_logs / snapshots
并 reset artists.vote_count=0 / current_rank=null。保留 users / artists / activity_config。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 13:55:55 +08:00
iye
10878ddb3f feat(vote): 重构投票模型为终身 12 票 + 每艺人 1 票
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
前端:
- store 改为 votedArtists[] + zustand persist
- VoteModal 删除 1/3/5/ALL 选择器,改三态(待投/已投/满额)
- 卡片/排行/详情页加 hasVoted 状态 + ✓ 角标
- Hero 右上角 Countdown 替换为 HeroVoteProgress(12 格点亮进度)
- /me 改为终身额度叙事(QuotaCard / StatsGrid / MyFanSupport)

后端:
- votes 表加 @@unique([userId, artistId])(已 apply 到生产 RDS)
- /api/vote 重写:12 票上限 + P2002 ALREADY_VOTED + P2003 NOT_FOUND 兜底
- /api/me 新增 votedArtists[] + voteQuota,移除 dailyQuota
- 新增 ERR.ALREADY_VOTED 错误码

测试:
- DB 层 5/5 + E2E 18/18 通过(scripts/e2e-vote-flow.sh)
- 修复 P2003 FK 违反未识别的 bug

详情见 docs/todo/voting-refactor-完成报告.md 与 voting-refactor-backend-完成报告.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 20:14:57 +08:00