From 200500a060d2ba65e5da0c170aa195b30739de02 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 2 Jun 2026 19:14:56 +0800 Subject: [PATCH] fix: use dialog theme customizer in app mode --- src/components/ThemeCustomizer.vue | 356 +++++++++++++++++------------ 1 file changed, 204 insertions(+), 152 deletions(-) diff --git a/src/components/ThemeCustomizer.vue b/src/components/ThemeCustomizer.vue index 06c50cf0..e5b59c1a 100644 --- a/src/components/ThemeCustomizer.vue +++ b/src/components/ThemeCustomizer.vue @@ -9,6 +9,7 @@ import { import { usePWA } from '@/composables/usePWA' import { useI18n } from 'vue-i18n' import { useTheme } from 'vuetify' +import { VDialog, VNavigationDrawer } from 'vuetify/components' const props = withDefaults( defineProps<{ @@ -37,6 +38,26 @@ const drawer = computed({ set: value => emit('update:modelValue', value), }) +const customizerContainer = computed(() => (appMode.value ? VDialog : VNavigationDrawer)) + +const customizerContainerProps = computed(() => { + if (appMode.value) { + return { + class: 'theme-customizer-dialog-overlay', + maxWidth: 420, + scrim: true, + } + } + + return { + class: 'theme-customizer-drawer', + location: 'right' as const, + scrim: false, + temporary: true, + width: 420, + } +}) + const themeOptions = computed>(() => [ { title: t('theme.light'), value: 'light', icon: 'mdi-white-balance-sunny' }, { title: t('theme.dark'), value: 'dark', icon: 'mdi-weather-night' }, @@ -108,162 +129,161 @@ async function handleResetSettings() {