diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-11-03 10:06:19 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-11-03 10:06:19 +0900 |
| commit | 7a5a541a4ed2ecd607b9e4545bcd192bcf381f17 (patch) | |
| tree | b186afa14867656555bc85d3c8ed19a327153bf6 /src/client/components | |
| parent | 12.52.0 (diff) | |
| download | misskey-7a5a541a4ed2ecd607b9e4545bcd192bcf381f17.tar.gz misskey-7a5a541a4ed2ecd607b9e4545bcd192bcf381f17.tar.bz2 misskey-7a5a541a4ed2ecd607b9e4545bcd192bcf381f17.zip | |
相対パスでコピーされるのを修正
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/page-window.vue | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/client/components/page-window.vue b/src/client/components/page-window.vue index 67f54ac15b..1cdfb8f003 100644 --- a/src/client/components/page-window.vue +++ b/src/client/components/page-window.vue @@ -28,6 +28,7 @@ import XHeader from '@/ui/_common_/header.vue'; import { popout } from '@/scripts/popout'; import copyToClipboard from '@/scripts/copy-to-clipboard'; import { resolve } from '@/router'; +import { url } from '@/config'; export default defineComponent({ components: { @@ -43,14 +44,14 @@ export default defineComponent({ provide() { return { - navHook: (url) => { - this.navigate(url); + navHook: (path) => { + this.navigate(path); } }; }, props: { - initialUrl: { + initialPath: { type: String, required: true, }, @@ -70,7 +71,7 @@ export default defineComponent({ data() { return { pageInfo: null, - url: this.initialUrl, + path: this.initialPath, component: this.initialComponent, props: this.initialProps, history: [], @@ -79,10 +80,14 @@ export default defineComponent({ }, computed: { + url(): string { + return url + this.path; + }, + contextmenu() { return [{ type: 'label', - text: this.url, + text: this.path, }, { icon: faExpandAlt, text: this.$t('showInPage'), @@ -91,7 +96,7 @@ export default defineComponent({ icon: faColumns, text: this.$t('openInSideView'), action: () => { - this.sideViewHook(this.url); + this.sideViewHook(this.path); this.$refs.window.close(); } } : undefined, { @@ -123,10 +128,10 @@ export default defineComponent({ } }, - navigate(url, record = true) { - if (record) this.history.push(this.url); - this.url = url; - const { component, props } = resolve(url); + navigate(path, record = true) { + if (record) this.history.push(this.path); + this.path = path; + const { component, props } = resolve(path); this.component = component; this.props = props; }, @@ -136,12 +141,12 @@ export default defineComponent({ }, expand() { - this.$router.push(this.url); + this.$router.push(this.path); this.$refs.window.close(); }, popout() { - popout(this.url, this.$el); + popout(this.path, this.$el); this.$refs.window.close(); }, }, |