perf(embed): improve embed performance (#14613)
* wip * wip * wip * refactor * refactor --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
@@ -18,11 +18,16 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div
|
||||
:class="$style.routerViewContainer"
|
||||
>
|
||||
<EmNotePage v-if="page === 'notes'" :noteId="contentId"/>
|
||||
<EmUserTimelinePage v-else-if="page === 'user-timeline'" :userId="contentId"/>
|
||||
<EmClipPage v-else-if="page === 'clips'" :clipId="contentId"/>
|
||||
<EmTagPage v-else-if="page === 'tags'" :tag="contentId"/>
|
||||
<XNotFound v-else/>
|
||||
<Suspense :timeout="0">
|
||||
<EmNotePage v-if="page === 'notes'" :noteId="contentId"/>
|
||||
<EmUserTimelinePage v-else-if="page === 'user-timeline'" :userId="contentId"/>
|
||||
<EmClipPage v-else-if="page === 'clips'" :clipId="contentId"/>
|
||||
<EmTagPage v-else-if="page === 'tags'" :tag="contentId"/>
|
||||
<XNotFound v-else/>
|
||||
<template #fallback>
|
||||
<EmLoading/>
|
||||
</template>
|
||||
</Suspense>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -37,6 +42,7 @@ import EmUserTimelinePage from '@/pages/user-timeline.vue';
|
||||
import EmClipPage from '@/pages/clip.vue';
|
||||
import EmTagPage from '@/pages/tag.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import EmLoading from '@/components/EmLoading.vue';
|
||||
|
||||
const page = location.pathname.split('/')[2];
|
||||
const contentId = location.pathname.split('/')[3];
|
||||
|
Reference in New Issue
Block a user