From 15a7ffa241a21b6634fb3fbc7606bb517fa7e1d5 Mon Sep 17 00:00:00 2001 From: Fine Date: Thu, 7 Dec 2023 16:27:03 +0800 Subject: [PATCH] fix: update --- src/layout/components/NavBar.vue | 3 +- src/views/dashboard/configuration/Tab.vue | 45 +++++------------------ 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/src/layout/components/NavBar.vue b/src/layout/components/NavBar.vue index f7f253e0..51c7e96d 100644 --- a/src/layout/components/NavBar.vue +++ b/src/layout/components/NavBar.vue @@ -93,7 +93,8 @@ limitations under the License. --> const savedTheme = window.localStorage.getItem("theme-is-dark"); if (savedTheme === "false") { theme.value = false; - } else if (savedTheme === "") { + } + if (savedTheme === "") { // read the theme preference from system setting if there is no user setting theme.value = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches; } diff --git a/src/views/dashboard/configuration/Tab.vue b/src/views/dashboard/configuration/Tab.vue index 4e1c8f09..2d81a363 100644 --- a/src/views/dashboard/configuration/Tab.vue +++ b/src/views/dashboard/configuration/Tab.vue @@ -13,11 +13,7 @@ limitations under the License. -->