This commit is contained in:
syuilo 2024-08-23 08:10:11 +09:00
parent d8dcad19a3
commit 2a915374dd
2 changed files with 2 additions and 31 deletions

View File

@ -1,29 +0,0 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { IRouter, RouteDef } from '@/nirax.js';
import { Router } from '@/nirax.js';
import { page } from '@/router/definition.js';
const routes: RouteDef[] = [{
path: '/embed/notes/:noteId',
component: page(() => import('@/embed/pages/note.vue')),
}, {
path: '/embed/user-timeline/@:username',
component: page(() => import('@/embed/pages/user-timeline.vue')),
}, {
path: '/embed/clips/:clipId',
component: page(() => import('@/embed/pages/clip.vue')),
}, {
path: '/embed/tags/:tag',
component: page(() => import('@/embed/pages/tag.vue')),
}, {
path: '/:(*)',
component: page(() => import('@/pages/not-found.vue')),
}];
export function createEmbedRouter(path: string): IRouter {
return new Router(routes, path, false, page(() => import('@/pages/not-found.vue')));
}

View File

@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div <div
:class="$style.routerViewContainer" :class="$style.routerViewContainer"
> >
<RouterView/> <!-- TODO -->
</div> </div>
<XCommon/> <XCommon/>
@ -27,13 +27,13 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { computed, provide, ref, shallowRef, onMounted, onUnmounted, inject } from 'vue'; import { computed, provide, ref, shallowRef, onMounted, onUnmounted, inject } from 'vue';
import type { ParsedEmbedParams } from '@/scripts/embed-page.js';
import XCommon from '@/ui/_common_/common.vue'; import XCommon from '@/ui/_common_/common.vue';
import { PageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js'; import { PageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js';
import { instanceName } from '@/config.js'; import { instanceName } from '@/config.js';
import { mainRouter } from '@/router/main.js'; import { mainRouter } from '@/router/main.js';
import { postMessageToParentWindow } from '@/scripts/post-message.js'; import { postMessageToParentWindow } from '@/scripts/post-message.js';
import { defaultEmbedParams } from '@/scripts/embed-page.js'; import { defaultEmbedParams } from '@/scripts/embed-page.js';
import type { ParsedEmbedParams } from '@/scripts/embed-page.js';
const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams); const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams);