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. -->