mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-21 00:18:11 +00:00
- 深色模式:背景 #202124,活跃Tab #323639,文字 #D6D6D7 - 浅色模式:背景 #F1F3F4,活跃Tab #FFFFFF,文字 #5F6368 - 同步更新 WebView 默认背景色和加载页背景色 - 更新 earth 图标选中态颜色适配新主题 - 删除未使用的 link 图标资源 - 语言切换时重建预加载池
16 lines
559 B
JavaScript
Vendored
16 lines
559 B
JavaScript
Vendored
let themeName = window.localStorage.getItem('__system:themeConf__')
|
|
if (!['dark', 'light'].includes(themeName)) {
|
|
let isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
themeName = isDark ? 'dark' : 'light'
|
|
}
|
|
if (themeName === 'dark') {
|
|
let style = document.createElement('style');
|
|
style.rel = 'stylesheet';
|
|
style.innerHTML = '.app-view-loading{background-color:#202124}'
|
|
if (document.head) {
|
|
document.head.appendChild(style);
|
|
} else {
|
|
document.body.appendChild(style);
|
|
}
|
|
}
|