From fa4f4bbbbb129bb189cbcde64b196ad66e164b33 Mon Sep 17 00:00:00 2001 From: Thomas Ballmann Date: Thu, 3 Dec 2020 19:03:30 +0100 Subject: [PATCH] layout switch fix --- app/src/App.vue | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/app/src/App.vue b/app/src/App.vue index 2ee91b6..439c266 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -32,30 +32,18 @@ }, data: () => ({ isLoading: true, - layout: 'layout-default', }), computed: { ...mapState(['stats']), + layout () { + return 'layout-' + (this.$route.meta.layout || 'default') + }, }, created () { - // switch layout if necessary - this.$router.beforeEach((to, from, next) => { - const layout = to.meta.layout || 'default' - this.layout = 'layout-' + layout - next() - }) - // load - - Promise.all([this.loadStats(), this.loadSettings()]).then((values) => { - this.isLoading = false - }) - - /* - this.loadStats().then(() => { + Promise.all([this.loadStats(), this.loadSettings()]).then(() => { this.isLoading = false }) - */ }, methods: { ...mapActions([