From d03d75602fb7259f0036a0713c30327fdd5d8655 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Thu, 26 Oct 2023 17:34:34 +0900 Subject: [PATCH] fix --- packages/frontend/src/ui/_common_/navbar.vue | 23 ++++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index 9c539d8f54..33c973f80a 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -127,16 +127,6 @@ if (darkMode.value) { iconUrl.value = iconLight; } -watch(darkMode, () => { - if (darkMode.value) { - bannerUrl.value = bannerDark; - iconUrl.value = iconDark; - } else { - bannerUrl.value = bannerLight; - iconUrl.value = iconLight; - } -}) - if (darkMode.value && gamingMode.value == true) { gamingType.value = 'dark'; } else if (!darkMode.value && gamingMode.value == true) { @@ -146,9 +136,18 @@ if (darkMode.value && gamingMode.value == true) { } watch([darkMode,gamingMode], () => { - if (darkMode.value && gamingMode.value == true) { + + if (darkMode.value) { + bannerUrl.value = bannerDark; + iconUrl.value = iconDark; + } else { + bannerUrl.value = bannerLight; + iconUrl.value = iconLight; + } + + if (darkMode.value && gamingMode.value) { gamingType.value = 'dark'; - } else if (!darkMode.value && gamingMode.value == true) { + } else if (!darkMode.value && gamingMode.value) { gamingType.value = 'light'; } else { gamingType.value = '';