fix(ui): 多项 UI 修复 — 弹窗遮挡/按钮可见性/暗黑闪烁/云函数版本

- 计划编辑弹窗移出 .container 避免 fixed 降级 + 修复滚动
- dock bottom 40rpx→8rpx 紧贴底部, sheet padding 同步调整
- 计划编辑器取消/恢复默认按钮可见性修复(bg 匹配容器)
- ui-btn--danger 按钮可见性修复
- 清除确认弹窗跟随暗黑模式切换
- icons.js build() 中 Fill 路径覆盖 outlined 路径修复
- plan.js getPlanDay 忽略 customPlans 修复
- darkMode.js 冗余三元简化
- util.js fileToDataURI fallback 可读性提升
- theme.js: BASE_VARS 与 getThemeStyle 统一来源, 去 50ms navbar 延迟
- app.wxss: 移除 page transition 和 background-color 减少闪白
- 云函数 wx-server-sdk 版本统一 ~2.6.3, tts cloud.init 一致化
- 闪白问题: wx.setBackgroundColor 三层防护(onLaunch/applyThemeToPage/switchTab)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-10 09:40:04 +08:00
parent d5121d349f
commit 1eff3d60c4
21 changed files with 104 additions and 76 deletions
+6 -5
View File
@@ -1,9 +1,10 @@
const themeMod = require('../utils/theme')
const darkMod = require('../utils/darkMode')
// Resolve the active theme synchronously at module load so the first paint
// already has the correct CSS variables — avoids a flash of the default theme.
const _initialTheme = themeMod.getCurrentTheme()
const _initialThemeStyle = themeMod.getThemeStyle(_initialTheme)
const _initialThemeStyle = themeMod.getThemeStyle(_initialTheme, darkMod.getInitialDarkMode())
// Inactive icon color follows the dark mode: matches --text-secondary in dark
// mode and a softer gray in light mode. Kept in sync with utils/theme.js so
@@ -11,10 +12,8 @@ const _initialThemeStyle = themeMod.getThemeStyle(_initialTheme)
const LIGHT_INACTIVE = '#999999'
const DARK_INACTIVE = '#98989F'
const _getInactiveColor = () => {
const darkMod = require('../utils/darkMode')
return darkMod.getInitialDarkMode() ? DARK_INACTIVE : LIGHT_INACTIVE
}
const _getInactiveColor = () =>
darkMod.getInitialDarkMode() ? DARK_INACTIVE : LIGHT_INACTIVE
const _initialInactiveColor = _getInactiveColor()
@@ -97,6 +96,8 @@ Component({
'/pages/settings/settings'
]
if (index === this.data.selected) return
// 切 tab 前设窗口背景色,避免真机过渡动画露出白色底色
try { themeMod.applyWindowBg() } catch (e) {}
wx.switchTab({ url: pages[index] })
},
// Called by settings.onSelectDarkMode - the dock isn't in
+1 -1
View File
@@ -1,6 +1,6 @@
.dock {
position: fixed;
bottom: calc(40rpx + env(safe-area-inset-bottom));
bottom: calc(8rpx + env(safe-area-inset-bottom));
left: 50%;
transform: translateX(-50%);
width: calc(100% - 80rpx);