forked from FoundKeyGang/FoundKey
ウィンドウ右クリックでサイドビューで開けるように
This commit is contained in:
parent
8d12fd152b
commit
84a7a9555f
1 changed files with 15 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
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 XWindow from '@/components/ui/window.vue';
|
||||||
import XHeader from '@/ui/_common_/header.vue';
|
import XHeader from '@/ui/_common_/header.vue';
|
||||||
import { popout } from '@/scripts/popout';
|
import { popout } from '@/scripts/popout';
|
||||||
|
@ -35,6 +35,12 @@ export default defineComponent({
|
||||||
XHeader,
|
XHeader,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
inject: {
|
||||||
|
sideViewHook: {
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
navHook: (url) => {
|
navHook: (url) => {
|
||||||
|
@ -81,7 +87,14 @@ export default defineComponent({
|
||||||
icon: faExpandAlt,
|
icon: faExpandAlt,
|
||||||
text: this.$t('showInPage'),
|
text: this.$t('showInPage'),
|
||||||
action: this.expand
|
action: this.expand
|
||||||
}, {
|
}, this.sideViewHook ? {
|
||||||
|
icon: faColumns,
|
||||||
|
text: this.$t('openInSideView'),
|
||||||
|
action: () => {
|
||||||
|
this.sideViewHook(this.url);
|
||||||
|
this.$refs.window.close();
|
||||||
|
}
|
||||||
|
} : undefined, {
|
||||||
icon: faExternalLinkAlt,
|
icon: faExternalLinkAlt,
|
||||||
text: this.$t('popout'),
|
text: this.$t('popout'),
|
||||||
action: this.popout
|
action: this.popout
|
||||||
|
|
Loading…
Reference in a new issue