diff --git a/app.wxss b/app.wxss index 8fa064f..469d6be 100644 --- a/app.wxss +++ b/app.wxss @@ -1,8 +1,4 @@ page { - --primary: #FF6B35; - --primary-light: #FF8C5A; - --primary-bg: #FFF3ED; - --primary-rgb: 255,107,53; --text: #333333; --text-secondary: #999999; --bg: #F5F5F5; diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index f306460..b04aba2 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -3,7 +3,7 @@ const themeMod = require('../utils/theme') Component({ data: { selected: 0, - themeStyle: '' + themeStyle: themeMod.BASE_VARS }, lifetimes: { diff --git a/pages/index/index.js b/pages/index/index.js index 2a01889..2f99235 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -6,7 +6,7 @@ const themeMod = require('../../utils/theme') Page({ data: { theme: { primary: '#FF6B35', primaryLight: '#FF8C5A', primaryBg: '#FFF3ED', primaryRgb: '255,107,53' }, - themeStyle: '', + themeStyle: themeMod.BASE_VARS, todayTarget: 0, todayDone: false, todayDuration: 0, diff --git a/pages/records/records.js b/pages/records/records.js index 51916ac..51d69fa 100644 --- a/pages/records/records.js +++ b/pages/records/records.js @@ -5,7 +5,7 @@ const themeMod = require('../../utils/theme') Page({ data: { theme: { primary: '#FF6B35', primaryLight: '#FF8C5A', primaryBg: '#FFF3ED', primaryRgb: '255,107,53' }, - themeStyle: '', + themeStyle: themeMod.BASE_VARS, totalDuration: 0, totalDurationText: '', totalSessions: 0, diff --git a/pages/settings/settings.js b/pages/settings/settings.js index c839580..e01adf5 100644 --- a/pages/settings/settings.js +++ b/pages/settings/settings.js @@ -4,7 +4,7 @@ const themeMod = require('../../utils/theme') Page({ data: { theme: { primary: '#FF6B35', primaryLight: '#FF8C5A', primaryBg: '#FFF3ED', primaryRgb: '255,107,53' }, - themeStyle: '', + themeStyle: themeMod.BASE_VARS, themes: themeMod.THEMES, currentThemeId: 'orange', plans: [ diff --git a/pages/timer/timer.js b/pages/timer/timer.js index ea89fb7..89b1ab4 100644 --- a/pages/timer/timer.js +++ b/pages/timer/timer.js @@ -6,7 +6,7 @@ const themeMod = require('../../utils/theme') Page({ data: { theme: { primary: '#FF6B35', primaryLight: '#FF8C5A', primaryBg: '#FFF3ED', primaryRgb: '255,107,53' }, - themeStyle: '', + themeStyle: themeMod.BASE_VARS, duration: 60, remaining: 60, status: 'idle', diff --git a/utils/theme.js b/utils/theme.js index 0b2015a..8e4105c 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -41,7 +41,7 @@ const THEMES = [ } ] -const BASE_VARS = '--text:#333;--text-secondary:#999;--bg:#F5F5F5;--card-bg:#FFFFFF;--border:#EEE;--success:#4CAF50;' +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 DEFAULT_THEME_ID = 'orange' const THEME_KEY = 'app_theme' let _lastNavColor = '' @@ -111,6 +111,7 @@ const getThemeStyle = (theme) => { module.exports = { THEMES, DEFAULT_THEME_ID, + BASE_VARS, getThemeById, getCurrentTheme, setTheme,