From 3c65e7b76ea474b45b498e275602c9b64fd57988 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 Dec 2020 18:13:50 +0900 Subject: [PATCH] fix deck navigation --- src/client/components/global/a.vue | 9 +-------- src/client/ui/deck.vue | 8 ++++++++ src/client/ui/desktop.vue | 8 ++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/client/components/global/a.vue b/src/client/components/global/a.vue index 671245fec7..cf894deaba 100644 --- a/src/client/components/global/a.vue +++ b/src/client/components/global/a.vue @@ -10,7 +10,7 @@ import { faExpandAlt, faColumns, faExternalLinkAlt, faLink, faWindowMaximize } f import * as os from '@/os'; import copyToClipboard from '@/scripts/copy-to-clipboard'; import { router } from '@/router'; -import { ui, url } from '@/config'; +import { url } from '@/config'; import { popout } from '@/scripts/popout'; import { ColdDeviceStorage } from '@/store'; @@ -115,13 +115,6 @@ export default defineComponent({ if (this.$store.state.defaultSideView && this.sideViewHook && this.to !== '/') { return this.sideViewHook(this.to); } - // TODO: a.vueからdeck-sotreを参照したくないのでなんとかする - //if (deckStore.state.device.deckNavWindow && (ui === 'deck') && this.to !== '/') { - // return this.window(); - //} - if (ui === 'desktop') { - return this.window(); - } if (this.$router.currentRoute.value.path === this.to) { window.scroll({ top: 0, behavior: 'smooth' }); diff --git a/src/client/ui/deck.vue b/src/client/ui/deck.vue index 6cdf56f3c3..fb40871a7d 100644 --- a/src/client/ui/deck.vue +++ b/src/client/ui/deck.vue @@ -50,6 +50,14 @@ export default defineComponent({ DeckColumnCore, }, + provide() { + return deckStore.state.navWindow ? { + navHook: (url) => { + os.pageWindow(url); + } + } : {}; + }, + data() { return { deckStore, diff --git a/src/client/ui/desktop.vue b/src/client/ui/desktop.vue index 199c0fdaaf..a1f58af5cc 100644 --- a/src/client/ui/desktop.vue +++ b/src/client/ui/desktop.vue @@ -22,6 +22,14 @@ export default defineComponent({ XSidebar }, + provide() { + return { + navHook: (url) => { + os.pageWindow(url); + } + }; + }, + data() { return { host: host,