Commit Graph

10 Commits

Author SHA1 Message Date
lc faa49cff1c feat(leaderboard): 下拉刷新动画图标
下拉刷新时顶部显示主题色旋转 spinner + "刷新中…"指示器,
仅下拉刷新显示(pullRefreshing),后台静默刷新保持无感。

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-28 09:20:43 +08:00
lc e2becc24aa feat(ui): 排行榜与首页打卡卡片多项优化
排行榜性能:
- 客户端乐观缓存:进页面/切周期秒显旧数据,后台静默刷新,消除 2-3s 空白
- 云函数实例缓存 TTL 60s -> 5min,降低全表扫描频率

排行榜 UI:
- 空状态重设计:奖杯光环插画(径向光晕 + 闪光漂浮)
- 领奖台 slot 撑满对齐列表、金银铜底座配色、角标与昵称间距修复、底线对齐

首页打卡卡片:
- 火焰光晕脉动 + 72rpx 大数字 + 分段进度格子
- 计划 >10 天时进度退化为里程碑连续条

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-27 17:28:53 +08:00
liucheng 41aa81083f fix: tts fileID 校验归属 + 排行榜不下发他人 openid
- tts: client 传的 fileID 校验必须属于 tts-cache 目录,防伪造 cloud:// 换取他人私有文件
- leaderboard: ranked 去掉他人 openid 改用 isMe 标记,wxml 用 item.isMe 高亮

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-25 14:59:15 +08:00
liucheng e682f07892 fix(leaderboard): 修复加载期空白页,加 loading 图标
- leaderboard.json 未注册 ui-skeleton,骨架屏不渲染致 loading 期空白
- 注册 ui-skeleton,骨架屏恢复 shimmer
- 骨架屏上方加主题色旋转加载图标 + "加载中…"

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-25 14:21:04 +08:00
lc 6176f2c341 feat(ui): 记录页月份联动与多项 UI 美化/修复
- records: 底部列表与月份选择器联动,新增 [本月|最近] 分段控件;标题/空态随模式切换
- leaderboard: 领奖台布局(冠军居中+皇冠)、次数标注于底座且三档水平对齐;头像 cloud:// 批量预解析提速(云函数需重新部署)
- index/timer: 主色底图标改白色变体修复隐形;目标数字按微信字体缩放补偿真机遮挡
- settings: 配色方案横滑渐变色卡;头像上传前压缩至 200px
- theme: 新增 teal 主题;暗黑背景统一对齐
- 圆形头像双保险(image 自身 border-radius)修复月/年榜方图

注: cloudfunctions/leaderboard 改动须在开发者工具重新部署才生效。
2026-07-22 09:36:22 +08:00
lc 5bbd84868a feat: 空状态插画 (CSS 简笔平板支撑小人 + 主题色气泡) 2026-07-08 11:38:41 +08:00
lc f3b825bdf9 feat: 排行榜行依次滑入动画 (前 10 行 60ms 错开) 2026-07-08 11:38:24 +08:00
lc f904870cbc feat: leaderboard 页面接入骨架屏 2026-07-08 11:35:21 +08:00
lc 0bba403b00 feat: 页面级入场动画 (fade + translateY) 应用到 5 个页面 2026-07-08 11:33:29 +08:00
lc 1d55df72b3 feat: v1.5 — plan editor, voice prompts, UI polish
Major features:
- Training plan editor: edit preset days/duration per plan (in-place
  override via custom_plans storage; preset ids preserved so existing
  records stay valid)
- Voice prompts at 4 fixed points during training (halfway / 30s /
  10s / done) via Tencent Cloud TTS (cloudfunctions/tts + utils/voice.js)
- Free-training button: switched from outline (transparent) to ghost
  variant (theme-tinted) for visual weight

Bug fixes:
- 4 functional pages: SVG data URIs failed to render in WeChat because
  '\#' in colors was parsed as a data-URI fragment delimiter. encode the
  whole SVG via encodeURIComponent in utils/icons.js build().
- Old records (saved before id field was added) could not be deleted
  (data-id was empty, triggered defensive guard). Backfill stable
  legacy-<month>-<index>-<duration> ids in getRecords() and persist.
- settings.js plan-row editor button event was bubbling up to the row's
  bindtap (which also fired onSelectPlan). Wrapped in catch:tap.

UI:
- Settings page: 3 hardcoded plans replaced with dynamic buildPlansList
  that overlays custom_plans on top of presets
- Plan editor: bottom-sheet modal in settings page (regular view, not
  ui-modal — WeChat custom component root element drops position:fixed
  in this runtime)
- Free-training button: rounded pill style, full-width, 24rpx gap from
  primary action; bottom sheet uses max-height: 88vh + internal scroll
- Version bumped to v1.5, last updated 2026-06-10

Removed:
- Daily reminder section (dailyReminder / reminderTime) — replaced by
  the 4 voice prompts which cover the same user need without requiring
  long-term scheduling that WeChat mini-programs can't actually do

Misc:
- utils/plan.js refactored to formula-driven: presets declare
  totalDays/startTarget/increment/cycleDays, days[] is generated. Same
  formula applies to custom plans.
- Timer _remind() guards each prompt on minimum duration so short
  free-mode sessions don't fire 'last30' at the start
- Cloud storage cloud_plans field added to data push payload; restored
  on first install via _restoreFromCloud
- .gitignore added for local AI tool caches (.reasonix/, reasonix.toml,
  .codegraph/daemon.pid)
2026-06-10 17:23:13 +08:00