feat/add_user_theme_view_controls: yarn add cookie-universal-nuxt , to allow users to choose the lightness of the theme and the compactness of the view on events

This commit is contained in:
sedum
2022-11-27 03:38:05 +01:00
parent f7386c5746
commit 88145867ae
7 changed files with 108 additions and 13 deletions

View File

@@ -32,7 +32,12 @@ export default {
components: { Appbar, Snackbar, Footer, Confirm },
computed: mapState(['settings']),
created () {
this.$vuetify.theme.dark = this.settings['theme.is_dark']
const theme_is_dark = this.$cookies.get('theme.is_dark')
if ( theme_is_dark != null ) {
this.$vuetify.theme.dark = theme_is_dark
} else {
this.$vuetify.theme.dark = this.settings['theme.is_dark']
}
}
}
</script>