From 84a7a9555ff114ac4b3b8f6c890462ff5e2e0f09 Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Wed, 28 Oct 2020 22:21:53 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6?= =?UTF-8?q?=E5=8F=B3=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E3=81=A7=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=83=89=E3=83=93=E3=83=A5=E3=83=BC=E3=81=A7=E9=96=8B?= =?UTF-8?q?=E3=81=91=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/page-window.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/client/components/page-window.vue b/src/client/components/page-window.vue index c3ec7db867..67f54ac15b 100644 --- a/src/client/components/page-window.vue +++ b/src/client/components/page-window.vue @@ -22,7 +22,7 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import { faExternalLinkAlt, faExpandAlt, faLink, faChevronLeft } from '@fortawesome/free-solid-svg-icons'; +import { faExternalLinkAlt, faExpandAlt, faLink, faChevronLeft, faColumns } from '@fortawesome/free-solid-svg-icons'; import XWindow from '@/components/ui/window.vue'; import XHeader from '@/ui/_common_/header.vue'; import { popout } from '@/scripts/popout'; @@ -35,6 +35,12 @@ export default defineComponent({ XHeader, }, + inject: { + sideViewHook: { + default: null + } + }, + provide() { return { navHook: (url) => { @@ -81,7 +87,14 @@ export default defineComponent({ icon: faExpandAlt, text: this.$t('showInPage'), action: this.expand - }, { + }, this.sideViewHook ? { + icon: faColumns, + text: this.$t('openInSideView'), + action: () => { + this.sideViewHook(this.url); + this.$refs.window.close(); + } + } : undefined, { icon: faExternalLinkAlt, text: this.$t('popout'), action: this.popout