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:
@@ -15,7 +15,7 @@
|
|||||||
width: 56rpx;
|
width: 56rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-grid {
|
.calendar-grid {
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
.day-num {
|
.day-num {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #333;
|
color: var(--text);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
.legend-label {
|
.legend-label {
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #999;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.legend-block {
|
.legend-block {
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ Component({
|
|||||||
ringWidth: { type: Number, value: 14 },
|
ringWidth: { type: Number, value: 14 },
|
||||||
status: { type: String, value: 'idle' },
|
status: { type: String, value: 'idle' },
|
||||||
primaryColor: { type: String, value: '#FF6B35' },
|
primaryColor: { type: String, value: '#FF6B35' },
|
||||||
primaryLightColor: { type: String, value: '#FF8C5A' }
|
primaryLightColor: { type: String, value: '#FF8C5A' },
|
||||||
|
// Track (background ring) color. Caller passes a darker shade in dark mode
|
||||||
|
// so the ring isn't an eye-searing light circle on a dark background.
|
||||||
|
trackColor: { type: String, value: '#EEEEEE' }
|
||||||
},
|
},
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
@@ -25,7 +28,7 @@ Component({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
'remaining, duration, size, ringWidth, primaryColor'() {
|
'remaining, duration, size, ringWidth, primaryColor, trackColor'() {
|
||||||
this._draw()
|
this._draw()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -54,7 +57,7 @@ Component({
|
|||||||
const ctx = this._ctx
|
const ctx = this._ctx
|
||||||
if (!ctx) return
|
if (!ctx) return
|
||||||
|
|
||||||
const { size, ringWidth, duration, remaining, primaryColor } = this.data
|
const { size, ringWidth, duration, remaining, primaryColor, trackColor } = this.data
|
||||||
const dpr = this._dpr
|
const dpr = this._dpr
|
||||||
|
|
||||||
const w = size * dpr
|
const w = size * dpr
|
||||||
@@ -69,7 +72,7 @@ Component({
|
|||||||
// track ring
|
// track ring
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
ctx.arc(cx, cy, radius, 0, Math.PI * 2)
|
ctx.arc(cx, cy, radius, 0, Math.PI * 2)
|
||||||
ctx.strokeStyle = '#EEEEEE'
|
ctx.strokeStyle = trackColor
|
||||||
ctx.lineWidth = lw
|
ctx.lineWidth = lw
|
||||||
ctx.lineCap = 'round'
|
ctx.lineCap = 'round'
|
||||||
ctx.stroke()
|
ctx.stroke()
|
||||||
|
|||||||
@@ -55,14 +55,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ui-btn--danger {
|
.ui-btn--danger {
|
||||||
background: #FFFFFF;
|
background: var(--card-bg);
|
||||||
color: #E53935;
|
color: var(--danger);
|
||||||
border: 2rpx solid rgba(229, 57, 53, 0.3);
|
border: 2rpx solid rgba(var(--danger-rgb), 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-btn--danger:active:not(.is-disabled) {
|
.ui-btn--danger:active:not(.is-disabled) {
|
||||||
background: rgba(229, 57, 53, 0.05);
|
background: rgba(var(--danger-rgb), 0.05);
|
||||||
border-color: #E53935;
|
border-color: var(--danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-btn--ghost {
|
.ui-btn--ghost {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
.ui-modal__body {
|
.ui-modal__body {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #FFFFFF;
|
background: var(--card-bg);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,7 +24,9 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 32rpx 32rpx 0 0;
|
border-radius: 32rpx 32rpx 0 0;
|
||||||
padding: 28rpx 32rpx 40rpx;
|
padding: 28rpx 32rpx 40rpx;
|
||||||
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
|
/* bottom sheet 需要避开 Dock TabBar(高度 ~110rpx + 40rpx 间隙),
|
||||||
|
否则最底下的按钮会被 toolbar 遮挡。150rpx = dock 高度 + margin。 */
|
||||||
|
padding-bottom: calc(150rpx + env(safe-area-inset-bottom));
|
||||||
animation: uiModalSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
animation: uiModalSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@
|
|||||||
.ui-modal__handle {
|
.ui-modal__handle {
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 8rpx;
|
height: 8rpx;
|
||||||
background: #DDD;
|
background: var(--bg-soft);
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
margin: 0 auto 24rpx;
|
margin: 0 auto 24rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-18
@@ -5,21 +5,23 @@ const themeMod = require('../utils/theme')
|
|||||||
const _initialTheme = themeMod.getCurrentTheme()
|
const _initialTheme = themeMod.getCurrentTheme()
|
||||||
const _initialThemeStyle = themeMod.getThemeStyle(_initialTheme)
|
const _initialThemeStyle = themeMod.getThemeStyle(_initialTheme)
|
||||||
|
|
||||||
// SVG icons as data URIs. We use two variants per icon:
|
// Inactive icon color follows the dark mode: matches --text-secondary in dark
|
||||||
// - *Fill*: solid filled (active state, theme color baked in at module load)
|
// mode and a softer gray in light mode. Kept in sync with utils/theme.js so
|
||||||
// - *Line*: outlined (inactive state, neutral gray)
|
// icons don't sit awkwardly on the dock background in either theme.
|
||||||
// Themes are 5 fixed colors so we can bake the active color in at module init.
|
const LIGHT_INACTIVE = '#999999'
|
||||||
// If the user changes theme, the component re-renders via pageLifetimes.show.
|
const DARK_INACTIVE = '#98989F'
|
||||||
|
|
||||||
// Solid (active) color from current theme
|
const _getInactiveColor = () => {
|
||||||
const _activeColor = _initialTheme.primary
|
const darkMod = require('../utils/darkMode')
|
||||||
// Inactive color
|
return darkMod.getInitialDarkMode() ? DARK_INACTIVE : LIGHT_INACTIVE
|
||||||
const _inactiveColor = '#999999'
|
}
|
||||||
|
|
||||||
|
const _initialInactiveColor = _getInactiveColor()
|
||||||
|
|
||||||
const _svg = (path, fill) =>
|
const _svg = (path, fill) =>
|
||||||
'data:image/svg+xml,' + encodeURIComponent(
|
'data:image/svg+xml,' + encodeURIComponent(
|
||||||
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="' + fill + '">' +
|
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="' + fill + '">' +
|
||||||
path + '</svg>'
|
path + '</svg>'
|
||||||
)
|
)
|
||||||
|
|
||||||
// 24x24 Material-style paths
|
// 24x24 Material-style paths
|
||||||
@@ -30,18 +32,18 @@ const PATH_CALENDAR_LINE = '<path d="M19 4h-2V2h-2v2H9V2H7v2H5C3.9 4 3 4.9 3 6v1
|
|||||||
const PATH_RANK = '<path d="M7.5 21H2V9h5.5v12zm7.25-14h-5.5v14h5.5V7zM22 11h-5.5v10H22V11z"/>'
|
const PATH_RANK = '<path d="M7.5 21H2V9h5.5v12zm7.25-14h-5.5v14h5.5V7zM22 11h-5.5v10H22V11z"/>'
|
||||||
const PATH_RANK_LINE = '<path d="M7.5 21H2V9h5.5v12zm7.25-14h-5.5v14h5.5V7zM22 11h-5.5v10H22V11z" fill-rule="evenodd"/>'
|
const PATH_RANK_LINE = '<path d="M7.5 21H2V9h5.5v12zm7.25-14h-5.5v14h5.5V7zM22 11h-5.5v10H22V11z" fill-rule="evenodd"/>'
|
||||||
const PATH_SETTINGS = '<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>'
|
const PATH_SETTINGS = '<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>'
|
||||||
const PATH_SETTINGS_LINE = '<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" fill-rule="evenodd"/>'
|
const PATH_SETTINGS_LINE = '<path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00-.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" fill-rule="evenodd"/>'
|
||||||
|
|
||||||
const _buildIcons = (activeHex) => {
|
const _buildIcons = (activeHex, inactiveHex) => {
|
||||||
const a = activeHex
|
const a = activeHex
|
||||||
return {
|
return {
|
||||||
home: _svg(PATH_HOME_LINE, _inactiveColor),
|
home: _svg(PATH_HOME_LINE, inactiveHex),
|
||||||
homeFill: _svg(PATH_HOME, a),
|
homeFill: _svg(PATH_HOME, a),
|
||||||
calendar: _svg(PATH_CALENDAR_LINE, _inactiveColor),
|
calendar: _svg(PATH_CALENDAR_LINE, inactiveHex),
|
||||||
calendarFill: _svg(PATH_CALENDAR, a),
|
calendarFill: _svg(PATH_CALENDAR, a),
|
||||||
rank: _svg(PATH_RANK_LINE, _inactiveColor),
|
rank: _svg(PATH_RANK_LINE, inactiveHex),
|
||||||
rankFill: _svg(PATH_RANK, a),
|
rankFill: _svg(PATH_RANK, a),
|
||||||
settings: _svg(PATH_SETTINGS_LINE, _inactiveColor),
|
settings: _svg(PATH_SETTINGS_LINE, inactiveHex),
|
||||||
settingsFill: _svg(PATH_SETTINGS, a)
|
settingsFill: _svg(PATH_SETTINGS, a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,12 +53,15 @@ Component({
|
|||||||
selected: 0,
|
selected: 0,
|
||||||
theme: _initialTheme,
|
theme: _initialTheme,
|
||||||
themeStyle: _initialThemeStyle,
|
themeStyle: _initialThemeStyle,
|
||||||
svgIcons: _buildIcons(_initialTheme.primary)
|
svgIcons: _buildIcons(_initialTheme.primary, _initialInactiveColor)
|
||||||
},
|
},
|
||||||
|
|
||||||
lifetimes: {
|
lifetimes: {
|
||||||
attached() {
|
attached() {
|
||||||
themeMod.applyThemeToPage(this)
|
themeMod.applyThemeToPage(this)
|
||||||
|
// Rebuild icons in case the user changed theme/dark mode since module load
|
||||||
|
const theme = themeMod.getCurrentTheme()
|
||||||
|
this.setData({ svgIcons: _buildIcons(theme.primary, _getInactiveColor()) })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -64,7 +69,7 @@ Component({
|
|||||||
show() {
|
show() {
|
||||||
themeMod.applyThemeToPage(this)
|
themeMod.applyThemeToPage(this)
|
||||||
const theme = themeMod.getCurrentTheme()
|
const theme = themeMod.getCurrentTheme()
|
||||||
this.setData({ svgIcons: _buildIcons(theme.primary) })
|
this.setData({ svgIcons: _buildIcons(theme.primary, _getInactiveColor()) })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
.done-badge {
|
.done-badge {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: rgba(76, 175, 80, 0.08);
|
background: rgba(var(--success-rgb), 0.08);
|
||||||
padding: 10rpx 24rpx;
|
padding: 10rpx 24rpx;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
.pending-text {
|
.pending-text {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #CCC;
|
color: var(--text-secondary);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@
|
|||||||
|
|
||||||
.preset-item {
|
.preset-item {
|
||||||
flex: 0 0 calc(33.33% - 12rpx);
|
flex: 0 0 calc(33.33% - 12rpx);
|
||||||
background: #F5F5F5;
|
background: var(--bg-soft);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -326,14 +326,14 @@
|
|||||||
|
|
||||||
.custom-label {
|
.custom-label {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: var(--text-secondary);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-input {
|
.custom-input {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
background: #F5F5F5;
|
background: var(--bg-soft);
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "排行榜",
|
"navigationBarTitleText": "排行榜",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"backgroundColor": "#F5F5F5",
|
|
||||||
"usingComponents": {}
|
"usingComponents": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,9 +112,9 @@
|
|||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-num.gold { background: #FFF7E6; color: #FA8C16; font-size: 36rpx; }
|
.rank-num.gold { background: rgba(250, 140, 22, 0.15); color: #FA8C16; font-size: 36rpx; }
|
||||||
.rank-num.silver { background: var(--bg-soft); color: #8C8C8C; font-size: 36rpx; }
|
.rank-num.silver { background: var(--bg-soft); color: #8C8C8C; font-size: 36rpx; }
|
||||||
.rank-num.bronze { background: #FFF1E6; color: #D46B08; font-size: 36rpx; }
|
.rank-num.bronze { background: rgba(212, 107, 8, 0.15); color: #D46B08; font-size: 36rpx; }
|
||||||
|
|
||||||
.rank-avatar {
|
.rank-avatar {
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
.history-hint {
|
.history-hint {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #CCC;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
@@ -126,14 +126,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-text {
|
.empty-text {
|
||||||
color: #CCC;
|
color: var(--text-secondary);
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-sub {
|
.empty-sub {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #E0E0E0;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-list {
|
.history-list {
|
||||||
@@ -195,8 +195,8 @@
|
|||||||
gap: 6rpx;
|
gap: 6rpx;
|
||||||
padding: 0 18rpx;
|
padding: 0 18rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
background: rgba(229, 57, 53, 0.1);
|
background: rgba(var(--danger-rgb), 0.1);
|
||||||
border: 2rpx solid rgba(229, 57, 53, 0.2);
|
border: 2rpx solid rgba(var(--danger-rgb), 0.2);
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
|
transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
|
||||||
@@ -204,8 +204,8 @@
|
|||||||
|
|
||||||
.history-delete-btn:active {
|
.history-delete-btn:active {
|
||||||
transform: scale(0.92);
|
transform: scale(0.92);
|
||||||
background: rgba(229, 57, 53, 0.2);
|
background: rgba(var(--danger-rgb), 0.2);
|
||||||
border-color: rgba(229, 57, 53, 0.4);
|
border-color: rgba(var(--danger-rgb), 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-delete-icon {
|
.history-delete-icon {
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
|
|
||||||
.history-delete-text {
|
.history-delete-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #E53935;
|
color: var(--danger);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
.plan-radio {
|
.plan-radio {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
border: 3rpx solid #DDD;
|
border: 3rpx solid var(--border);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background: #F5F5F5;
|
background: var(--bg-soft);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: none;
|
border: none;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
/* peopleFill svg is mostly transparent; give it a soft tint */
|
/* peopleFill svg is mostly transparent; give it a soft tint */
|
||||||
background: #EEE;
|
background: var(--bg-soft);
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
|
|
||||||
.about-copy {
|
.about-copy {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #CCCCCC;
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- plan editor modal ---- */
|
/* ---- plan editor modal ---- */
|
||||||
@@ -347,7 +347,7 @@
|
|||||||
max-height: 88vh;
|
max-height: 88vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #FFFFFF;
|
background: var(--card-bg);
|
||||||
border-radius: 32rpx 32rpx 0 0;
|
border-radius: 32rpx 32rpx 0 0;
|
||||||
padding: 12rpx 32rpx 40rpx;
|
padding: 12rpx 32rpx 40rpx;
|
||||||
/* Sheet is z-index 1000 above the tab bar (z-index 999), but the tab bar
|
/* Sheet is z-index 1000 above the tab bar (z-index 999), but the tab bar
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
.plan-editor-handle {
|
.plan-editor-handle {
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 8rpx;
|
height: 8rpx;
|
||||||
background: #DDD;
|
background: var(--bg-soft);
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
margin: 0 auto 16rpx;
|
margin: 0 auto 16rpx;
|
||||||
}
|
}
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
|
|
||||||
.editor-input {
|
.editor-input {
|
||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
background: #F5F5F5;
|
background: var(--bg-soft);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -420,7 +420,7 @@
|
|||||||
|
|
||||||
.editor-preview {
|
.editor-preview {
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
background: #FAFAFA;
|
background: var(--bg);
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
padding: 12rpx 16rpx;
|
padding: 12rpx 16rpx;
|
||||||
}
|
}
|
||||||
@@ -453,7 +453,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8rpx 0;
|
padding: 8rpx 0;
|
||||||
border-bottom: 1rpx solid #EEE;
|
border-bottom: 1rpx solid var(--border);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,13 +498,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.editor-action-reset {
|
.editor-action-reset {
|
||||||
background: #FFFFFF;
|
background: var(--card-bg);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
border: 2rpx solid var(--border);
|
border: 2rpx solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-action-reset:active {
|
.editor-action-reset:active {
|
||||||
background: #F5F5F5;
|
background: var(--bg-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-action-save {
|
.editor-action-save {
|
||||||
@@ -575,6 +575,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.confirm-btn--danger {
|
.confirm-btn--danger {
|
||||||
background: #E53935;
|
background: var(--danger);
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -41,7 +41,7 @@ const THEMES = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const BASE_VARS = '--text:#333;--text-secondary:#999;--bg:#F5F5F5;--card-bg:#FFFFFF;--border:#EEE;--success:#4CAF50;--primary:#FF6B35;--primary-light:#FF8C5A;--primary-bg:#FFF3ED;--primary-rgb:255,107,53;'
|
const BASE_VARS = '--text:#333;--text-secondary:#999;--bg:#F5F5F5;--card-bg:#FFFFFF;--border:#EEE;--success:#4CAF50;--success-rgb:76,175,80;--danger:#E53935;--danger-rgb:229,57,53;--primary:#FF6B35;--primary-light:#FF8C5A;--primary-bg:#FFF3ED;--primary-rgb:255,107,53;'
|
||||||
const DEFAULT_THEME_ID = 'orange'
|
const DEFAULT_THEME_ID = 'orange'
|
||||||
const THEME_KEY = 'app_theme'
|
const THEME_KEY = 'app_theme'
|
||||||
let _navColorTimer = null
|
let _navColorTimer = null
|
||||||
@@ -97,8 +97,8 @@ const setTheme = (id) => {
|
|||||||
const getThemeStyle = (theme, isDark = false) => {
|
const getThemeStyle = (theme, isDark = false) => {
|
||||||
const t = theme || getCurrentTheme()
|
const t = theme || getCurrentTheme()
|
||||||
const baseVars = isDark
|
const baseVars = isDark
|
||||||
? '--text:#E5E5E7;--text-secondary:#98989F;--bg:#0F0F12;--bg-gradient-start:#0F0F12;--bg-gradient-end:#14141A;--card-bg:#1C1C1E;--bg-soft:#2C2C2E;--border:#2C2C2E;--success:#30D158;'
|
? '--text:#E5E5E7;--text-secondary:#98989F;--bg:#0F0F12;--bg-gradient-start:#0F0F12;--bg-gradient-end:#14141A;--card-bg:#1C1C1E;--bg-soft:#2C2C2E;--border:#2C2C2E;--success:#30D158;--success-rgb:48,209,88;--danger:#FF6B6B;--danger-rgb:255,107,107;'
|
||||||
: '--text:#333333;--text-secondary:#999999;--bg:#F5F5F5;--bg-gradient-start:#F5F5F5;--bg-gradient-end:#FAFAFA;--card-bg:#FFFFFF;--bg-soft:#F0F0F0;--border:#EEEEEE;--success:#4CAF50;'
|
: '--text:#333333;--text-secondary:#999999;--bg:#F5F5F5;--bg-gradient-start:#F5F5F5;--bg-gradient-end:#FAFAFA;--card-bg:#FFFFFF;--bg-soft:#F0F0F0;--border:#EEEEEE;--success:#4CAF50;--success-rgb:76,175,80;--danger:#E53935;--danger-rgb:229,57,53;'
|
||||||
return `${baseVars}--primary:${t.primary};--primary-light:${t.primaryLight};--primary-bg:${t.primaryBg};--primary-rgb:${t.primaryRgb};`
|
return `${baseVars}--primary:${t.primary};--primary-light:${t.primaryLight};--primary-bg:${t.primaryBg};--primary-rgb:${t.primaryRgb};`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user