From 90231ef84de6159594f26e7502d5b8f3ba323ad6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 6 Sep 2022 11:44:55 +0200 Subject: [PATCH] rename data-theme to dark-theme --- app/src/App.vue | 4 ++-- app/src/scss/_variables.scss | 6 +----- app/src/store/settings.js | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/App.vue b/app/src/App.vue index 51480bc1..d0b096a4 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -7,7 +7,7 @@ :to="{ name: 'home' }" :disabled="waiting" exact exact-active-class="active" > - + Yunohost logo @@ -160,7 +160,7 @@ export default { this.$store.commit('SET_SPINNER', 'spookycat') } - document.documentElement.setAttribute('data-theme', localStorage.getItem('theme')) // updates the data-theme attribute + document.documentElement.setAttribute('dark-theme', localStorage.getItem('theme')) // updates the data-theme attribute } } diff --git a/app/src/scss/_variables.scss b/app/src/scss/_variables.scss index 5d691ff6..a34c599a 100644 --- a/app/src/scss/_variables.scss +++ b/app/src/scss/_variables.scss @@ -55,11 +55,9 @@ $font-weight-bold: 500; --info: #0079c4; --success: #81c926; --warning: #ffc107; - - --logo-src: "./assets/logo_dark.png"; } -[data-theme="true"] { +[dark-theme="true"] { /* Variables for dark mode */ --background-color: #222c3c; --background-color-secondary: #273142; @@ -85,8 +83,6 @@ $font-weight-bold: 500; --info: #0093ee; --success: #96bf47; --warning: #ffc02a; - - --logo-src: "./assets/logo_light.png"; } $purple: #9932cc; diff --git a/app/src/store/settings.js b/app/src/store/settings.js index aa0222cf..9d94c620 100644 --- a/app/src/store/settings.js +++ b/app/src/store/settings.js @@ -52,7 +52,7 @@ export default { 'SET_THEME' (state, boolean) { localStorage.setItem('theme', boolean) state.theme = boolean - document.documentElement.setAttribute('data-theme', boolean) + document.documentElement.setAttribute('dark-theme', boolean) } },