From 6c65d70d89db04f1a6a68e618f4c9f17226851ae Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 17 Feb 2019 21:28:20 +0900 Subject: [PATCH] Fix #4292 (#4294) * Fix #4292 * use commit --- src/client/app/desktop/script.ts | 7 ++++++- .../app/desktop/views/components/ui.header.account.vue | 4 ++-- src/client/app/desktop/views/components/ui.header.nav.vue | 2 +- src/client/app/desktop/views/components/ui.sidebar.vue | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 9fa4ec39f..6957f34d7 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -124,11 +124,16 @@ init(async (launch, os) => { require('./views/components'); require('./views/widgets'); + os.store.commit('device/set', { + key: 'inDeckMode', + value: os.store.getters.isSignedIn && os.store.state.device.deckMode && document.location.pathname === '/' + }); + // Init router const router = new VueRouter({ mode: 'history', routes: [ - os.store.getters.isSignedIn && os.store.state.device.deckMode && document.location.pathname === '/' + os.store.state.device.inDeckMode ? { path: '/', name: 'index', component: MkDeck, children: [ { path: '/@:user', name: 'user', component: () => import('./views/deck/deck.user-column.vue').then(m => m.default), children: [ { path: '', name: 'user', component: () => import('./views/deck/deck.user-column.home.vue').then(m => m.default) }, diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue index d94549c2a..37983285c 100644 --- a/src/client/app/desktop/views/components/ui.header.account.vue +++ b/src/client/app/desktop/views/components/ui.header.account.vue @@ -63,7 +63,7 @@
  • {{ $t('@.deck') }} - +

  • @@ -165,7 +165,7 @@ export default Vue.extend({ }); }, toggleDeckMode() { - this.$store.commit('device/set', { key: 'deckMode', value: !this.$store.state.device.deckMode }); + this.$store.commit('device/set', { key: 'deckMode', value: !this.$store.state.device.inDeckMode }); location.reload(); }, } diff --git a/src/client/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue index e10ff08de..690d2fe84 100644 --- a/src/client/app/desktop/views/components/ui.header.nav.vue +++ b/src/client/app/desktop/views/components/ui.header.nav.vue @@ -1,7 +1,7 @@