feat(theme): 默认主题改为玻璃并升级版本至3.0.1触发打包

This commit is contained in:
jxxghp
2026-08-16 08:33:52 +08:00
parent b65682da53
commit 485f599489
8 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -572,9 +572,9 @@
return /^#[0-9a-f]{6}$/i.test(cachedBackground || '') ? cachedBackground : null
}
// 读取已保存的主题偏好,缺省时跟随系统
// 读取已保存的主题偏好,缺省时使用玻璃主题
function getSavedThemePreference() {
return getLocalStorageValue('theme') || 'auto'
return getLocalStorageValue('theme') || 'glass'
}
// 将启动阶段的主题偏好解析为实际主题。
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "moviepilot",
"version": "3.0.0",
"version": "3.0.1",
"private": true,
"type": "module",
"bin": "dist/service.js",
+3 -3
View File
@@ -129,7 +129,7 @@ const glassMaterialTintColor = computed(
normalizeThemeMaterialAccent(globalTheme.current.value.colors.primary)?.hex ??
normalizeThemeMaterialAccent(themeCustomizerPrimaryColors[0].value)!.hex,
)
let themeValue = localStorage.getItem('theme') || 'auto'
let themeValue = localStorage.getItem('theme') || 'glass'
let resumeThemeSyncTimer: number | null = null
globalTheme.name.value = resolveInitialThemeName(themeValue)
applyStoredThemeCustomizerAppearance(vuetifyTheme)
@@ -527,7 +527,7 @@ function syncThemePreferenceFromStorage(preferCachedAuto = false) {
resumeThemeSyncTimer = null
}
themeValue = localStorage.getItem('theme') || 'auto'
themeValue = localStorage.getItem('theme') || 'glass'
const resolvedTheme =
themeValue === 'auto' && preferCachedAuto
@@ -561,7 +561,7 @@ function syncThemePreferenceFromStorage(preferCachedAuto = false) {
// 系统配色变化时,在自动主题模式下刷新当前实际主题。
function handleSystemThemeChange() {
if ((localStorage.getItem('theme') || 'auto') === 'auto') {
if ((localStorage.getItem('theme') || 'glass') === 'auto') {
syncThemePreferenceFromStorage()
}
}
+1 -1
View File
@@ -215,7 +215,7 @@ async function handleResetSettings() {
await setRadius('default')
await setShadow('0')
await setSkin('default')
await setTheme('auto')
await setTheme('glass')
}
</script>
+4 -4
View File
@@ -168,11 +168,11 @@ function isHexColor(color: unknown): color is string {
/** 读取并校验本地存储中的主题偏好。 */
function readStoredThemePreference(): ThemeCustomizerTheme {
if (!isBrowser()) return 'auto'
if (!isBrowser()) return 'glass'
const storedTheme = localStorage.getItem('theme')
return validThemes.includes(storedTheme as ThemeCustomizerTheme) ? (storedTheme as ThemeCustomizerTheme) : 'auto'
return validThemes.includes(storedTheme as ThemeCustomizerTheme) ? (storedTheme as ThemeCustomizerTheme) : 'glass'
}
/** 从预设矩阵生成指定质量的清透自然玻璃默认设置。 */
@@ -660,7 +660,7 @@ export function isDefaultThemeCustomizerSettings(settings: ThemeCustomizerSettin
semiDarkMenu: false,
shadow: '0',
skin: 'default',
theme: 'auto',
theme: 'glass',
})
return (
@@ -897,7 +897,7 @@ export function useThemeCustomizer() {
semiDarkMenu: false,
shadow: '0',
skin: 'default',
theme: 'auto',
theme: 'glass',
})
}
@@ -282,7 +282,7 @@ const getUIModeIcon = computed(() => {
// 主题相关功能
const { name: themeName, global: globalTheme } = useTheme()
const savedTheme = ref(localStorage.getItem('theme') ?? 'auto')
const savedTheme = ref(localStorage.getItem('theme') ?? 'glass')
const currentThemeName = ref(savedTheme.value)
const themeCustomizerSettings = ref(readThemeCustomizerSettings())
@@ -332,7 +332,7 @@ function getThemeLayoutTitle(layout: ThemeCustomizerSettings['layout']) {
}
const currentThemeSummary = computed(() => {
const themeTitle = themes.find(theme => theme.name === currentThemeName.value)?.title || t('theme.auto')
const themeTitle = themes.find(theme => theme.name === currentThemeName.value)?.title || t('theme.glass')
const layoutTitle = appMode.value ? '' : getThemeLayoutTitle(themeCustomizerSettings.value.layout)
if (layoutTitle) return `${themeTitle} · ${layoutTitle}`
+1 -1
View File
@@ -125,7 +125,7 @@ const AsyncAceEditor = defineAsyncComponent(async () => {
const AsyncApexChart = defineAsyncComponent(async () => {
const component = (await import('vue3-apexcharts')).default
const themeName = document.documentElement.getAttribute('data-theme') || localStorage.getItem('theme') || 'light'
const themeName = document.documentElement.getAttribute('data-theme') || localStorage.getItem('theme') || 'glass'
configureApexChartsTheme(themeName)
return component
})
+1 -1
View File
@@ -1,7 +1,7 @@
import type { VuetifyOptions } from 'vuetify'
const theme: VuetifyOptions['theme'] = {
defaultTheme: 'light',
defaultTheme: 'glass',
themes: {
light: {
dark: false,