From 63407ea0a1f729bcdeb042f5183881a0972ea752 Mon Sep 17 00:00:00 2001 From: Marcel Hellkamp Date: Mon, 7 Aug 2023 18:21:30 +0200 Subject: [PATCH] fix: Dark mode not working on dark browsers Ironically, only if browser preference and wall config agreed both on dark mode, it was not applied because there was no change detected by watch(). --- src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index ce0ad7d..7b8e3ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -59,7 +59,7 @@ const actualTheme = computed(() => { }) watch(actualTheme, () => { document.body!.parentElement!.dataset.bsTheme = actualTheme.value -}) +}, {immediate: true}) // Update page title watch(() => config.value?.title, () => document.title = config.value?.title || fallbackConfig.title)