diff --git a/src/App.vue b/src/App.vue index 3e0e3f8c8..5ddc4e3cd 100755 --- a/src/App.vue +++ b/src/App.vue @@ -30,6 +30,7 @@ import AppTopBar from '@/AppTopBar.vue'; import AppMenu from '@/AppMenu.vue'; import AppFooter from '@/AppFooter.vue'; import AppConfigurator from '@/AppConfigurator.vue'; +import EventBus from '@/EventBus'; export default { data() { @@ -70,6 +71,14 @@ export default { this.theme = event.theme; this.activeMenuIndex = null; + + EventBus.$emit('change-theme', event); + + if (event.dark) + document.body.setAttribute('data-darktheme', 'true'); + else + document.body.removeAttribute('data-darktheme') + }, addClass(element, className) { if (!this.hasClass(element, className)) { diff --git a/src/AppConfigurator.vue b/src/AppConfigurator.vue index b86a4134f..df05e2446 100755 --- a/src/AppConfigurator.vue +++ b/src/AppConfigurator.vue @@ -16,28 +16,28 @@