mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
rename data-theme to dark-theme
This commit is contained in:
parent
7f58d4b0e3
commit
90231ef84d
3 changed files with 4 additions and 8 deletions
|
@ -7,7 +7,7 @@
|
|||
:to="{ name: 'home' }" :disabled="waiting"
|
||||
exact exact-active-class="active"
|
||||
>
|
||||
<span v-if="theme == true">
|
||||
<span v-if="theme">
|
||||
<img alt="Yunohost logo" src="./assets/logo_light.png" width="40">
|
||||
</span>
|
||||
<span v-else>
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue