From dc777535370a418dff4545c424943019ad629203 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 26 Mar 2024 12:14:45 +0300 Subject: [PATCH] Remove stateful dark --- app.vue | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app.vue b/app.vue index f33504dca..b2ea22cbe 100644 --- a/app.vue +++ b/app.vue @@ -8,14 +8,6 @@ import EventBus from '@/layouts/AppEventBus'; export default { - beforeMount() { - const isDark = localStorage['primevue-theme'] === 'dark' || (!('primevue-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches); - - if (isDark) document.documentElement.classList.add('p-dark'); - else document.documentElement.classList.remove('p-dark'); - - this.$appState.darkTheme = isDark; - }, mounted() { EventBus.on('theme-change', this.themeChangeListener); }, @@ -38,7 +30,6 @@ export default { if (isDark) document.documentElement.classList.add('p-dark'); else document.documentElement.classList.remove('p-dark'); - localStorage['primevue-theme'] = isDark ? 'dark' : 'light'; this.$appState.darkTheme = isDark; } }