diff --git a/src/client/app/common/views/components/mfm.ts b/src/client/app/common/views/components/mfm.ts index 945917288..7de29b2aa 100644 --- a/src/client/app/common/views/components/mfm.ts +++ b/src/client/app/common/views/components/mfm.ts @@ -8,7 +8,7 @@ import { concat, sum } from '../../../../../prelude/array'; import MkFormula from './formula.vue'; import MkCode from './code.vue'; import MkGoogle from './google.vue'; -import { host } from '../../../config'; +import { host, url } from '../../../config'; import { preorderF, countNodesF } from '../../../../../prelude/tree'; function sumTextsLength(ts: MfmForest): number { @@ -175,7 +175,9 @@ export default Vue.component('misskey-flavored-markdown', { props: { url: token.node.props.url, rel: 'nofollow noopener', - target: '_blank' + ...(token.node.props.url.startsWith(url) ? {} : { + target: '_blank' + }) }, attrs: { style: 'color:var(--mfmUrl);' diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index 9ca4497ad..6e0d73eef 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -9,7 +9,7 @@
- +
@@ -23,17 +23,18 @@

{{ sitename }}

-
+
- - diff --git a/src/client/app/desktop/views/pages/page.vue b/src/client/app/desktop/views/pages/page.vue deleted file mode 100644 index 1ddff08c7..000000000 --- a/src/client/app/desktop/views/pages/page.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index 106e843ca..d04662cc1 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -149,8 +149,8 @@ init((launch, os) => { { path: '/i/drive', name: 'drive', component: MkDrive }, { path: '/i/drive/folder/:folder', component: MkDrive }, { path: '/i/drive/file/:file', component: MkDrive }, - { path: '/i/pages/new', component: () => import('./views/pages/page-editor.vue').then(m => m.default) }, - { path: '/i/pages/edit/:pageId', props: true, component: () => import('./views/pages/page-editor.vue').then(m => m.default) }, + { path: '/i/pages/new', component: UI, props: route => ({ component: () => import('../common/views/pages/page-editor/page-editor.vue').then(m => m.default) }) }, + { path: '/i/pages/edit/:pageId', component: UI, props: route => ({ component: () => import('../common/views/pages/page-editor/page-editor.vue').then(m => m.default), initPageId: route.params.pageId }) }, { path: '/selectdrive', component: MkSelectDrive }, { path: '/search', component: MkSearch }, { path: '/tags/:tag', component: MkTag }, @@ -163,8 +163,8 @@ init((launch, os) => { { path: 'following', component: () => import('../common/views/pages/following.vue').then(m => m.default) }, { path: 'followers', component: () => import('../common/views/pages/followers.vue').then(m => m.default) }, ]}, - { path: '/@:user/pages/:page', props: true, component: () => import('./views/pages/page.vue').then(m => m.default) }, - { path: '/@:user/pages/:pageName/view-source', props: true, component: () => import('./views/pages/page-editor.vue').then(m => m.default) }, + { path: '/@:user/pages/:page', component: UI, props: route => ({ component: () => import('../common/views/pages/page/page.vue').then(m => m.default), pageName: route.params.page, username: route.params.user }) }, + { path: '/@:user/pages/:pageName/view-source', component: UI, props: route => ({ component: () => import('../common/views/pages/page-editor/page-editor.vue').then(m => m.default), initUser: route.params.user, initPageName: route.params.pageName }) }, { path: '/notes/:note', component: MkNote }, { path: '/authorize-follow', component: MkFollow }, { path: '*', component: MkNotFound } diff --git a/src/client/app/mobile/views/pages/page-editor.vue b/src/client/app/mobile/views/pages/page-editor.vue deleted file mode 100644 index 0b04f2580..000000000 --- a/src/client/app/mobile/views/pages/page-editor.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/src/client/app/mobile/views/pages/page.vue b/src/client/app/mobile/views/pages/page.vue deleted file mode 100644 index f494abffd..000000000 --- a/src/client/app/mobile/views/pages/page.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - -