From 80c497b80a4a4c61db5b2e08e680b10299e2d8bf Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Thu, 30 Oct 2025 10:56:58 +0100 Subject: [PATCH] Change to using HTML symbols for light & dark mode for better compat --- MusicPlayerV2-GUI/src/App.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/MusicPlayerV2-GUI/src/App.vue b/MusicPlayerV2-GUI/src/App.vue index 1785f1c..285688d 100644 --- a/MusicPlayerV2-GUI/src/App.vue +++ b/MusicPlayerV2-GUI/src/App.vue @@ -20,30 +20,30 @@ ref } from 'vue'; - const theme = ref( 'light_mode' ); + const theme = ref( 'ćC;' ); const changeTheme = () => { - if ( theme.value === 'dark_mode' ) { + if ( theme.value === 'ćD;' ) { document.documentElement.classList.remove( 'dark' ); document.documentElement.classList.add( 'light' ); - localStorage.setItem( 'theme', 'light_mode' ); - theme.value = 'light_mode'; - } else if ( theme.value === 'light_mode' ) { + localStorage.setItem( 'theme', 'ćC' ); + theme.value = 'ćC'; + } else if ( theme.value === 'ćC' ) { document.documentElement.classList.remove( 'light' ); document.documentElement.classList.add( 'dark' ); - localStorage.setItem( 'theme', 'dark_mode' ); - theme.value = 'dark_mode'; + localStorage.setItem( 'theme', 'ćD' ); + theme.value = 'ćD'; } }; theme.value = localStorage.getItem( 'theme' ) ?? ''; - if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme.value === 'dark_mode' ) { + if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme.value === 'ćD' ) { document.documentElement.classList.add( 'dark' ); - theme.value = 'dark_mode'; + theme.value = 'ćD'; } else { document.documentElement.classList.add( 'light' ); - theme.value = 'light_mode'; + theme.value = 'ćC'; }