fix css variables not updating correctly when system theme changes

This commit is contained in:
Gregor Vostrak
2025-06-08 15:47:25 +02:00
parent dc21ac8352
commit 7578beb271
8 changed files with 85 additions and 37 deletions

View File

@@ -3,13 +3,6 @@ import { computed, watch } from "vue";
type themeOption = "system" | "light" | "dark";
const themeSetting = useStorage<themeOption>("theme", "system");
// reload page when themeSettingChanges
watch(
themeSetting,
() => {
location.reload();
}
)
const preferredColor = usePreferredColorScheme();
const theme = computed(() => {
if(themeSetting.value === "system"){