feat(ui): 全项目暗黑模式适配 — 加 theme 变量 + 替换全部硬编码颜色

新增主题变量 (light + dark 两套):
- --success-rgb / --danger / --danger-rgb (utils/theme.js)

全部硬编码 #XXX / rgba 颜色统一改主题变量:
- progress-ring 加 trackColor prop,默认 #EEEEEE
  (canvas 不能直接读 CSS var,需要 caller 传字面颜色)
- ui-modal sheet 背景 #FFFFFF → var(--card-bg), 加底部 padding 避开 Dock TabBar
- ui-modal handle #DDD → var(--bg-soft)
- ui-btn --danger 文字 #E53935 → var(--danger), 边框 rgba(229,57,53,...) → rgba(var(--danger-rgb),...)
- calendar-heatmap 三个 #999/#333 文字色 → var(--text-secondary)/var(--text)
- index picker: preset/custom input 背景 #F5F5F5 → var(--bg-soft), label #666 → var(--text-secondary)
- index done-badge 绿色 → var(--success-rgb), pending-text #CCC → var(--text-secondary)
- records empty/hint #CCC/#E0E0E0 → var(--text-secondary), danger 红 → var(--danger)
- settings plan-editor-sheet 背景 #FFFFFF → var(--card-bg), avatar 背景, handle, editor-input, preview 全部跟进
- leaderboard 金/铜背景 #FFF7E6/#FFF1E6 → rgba 半透明 (dark mode 下不刺眼)

Tab bar inactive 图标重新根据 dark mode 切换颜色 (#999999 light / #98989F dark)

leaderboard.json 删除 backgroundColor: #F5F5F5 覆盖,让 theme.json 接管

故意保留:
- 各 .wxss 中渐变按钮上的 #FFFFFF 文字色
- 排行榜金/铜文字色 #FA8C16/#D46B08 (视觉符号约定)
- 各页 data 中 orange theme 默认值 (onShow 后被 themeMod 覆盖)
This commit is contained in:
2026-07-08 15:22:09 +08:00
parent 326bc013fe
commit ac0db6118d
11 changed files with 73 additions and 64 deletions
@@ -15,7 +15,7 @@
width: 56rpx;
text-align: center;
font-size: 22rpx;
color: #999;
color: var(--text-secondary);
}
.calendar-grid {
@@ -44,7 +44,7 @@
.day-num {
font-size: 22rpx;
color: #333;
color: var(--text);
font-weight: 500;
}
@@ -58,7 +58,7 @@
.legend-label {
font-size: 20rpx;
color: #999;
color: var(--text-secondary);
}
.legend-block {