feat: re-apply timelines loading optimization (#524)
Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
parent
db7f82422e
commit
baa2696d31
25 changed files with 155 additions and 99 deletions
|
@ -6,16 +6,6 @@ definePageMeta({
|
|||
alias: ['/signin/callback'],
|
||||
})
|
||||
|
||||
if (useRoute().path === '/signin/callback') {
|
||||
// This only cleans up the URL; page content should stay the same
|
||||
useRouter().push('/home')
|
||||
}
|
||||
|
||||
const masto = useMasto()
|
||||
const paginator = masto.timelines.iterateHome()
|
||||
const stream = await masto.stream.streamUser()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
const { t } = useI18n()
|
||||
useHeadFixed({
|
||||
title: () => t('nav_side.home'),
|
||||
|
@ -30,9 +20,7 @@ useHeadFixed({
|
|||
<span>{{ $t('nav_side.home') }}</span>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
<slot>
|
||||
<PublishWidget draft-key="home" border="b base" />
|
||||
<TimelinePaginator v-bind="{ paginator, stream }" context="home" />
|
||||
</slot>
|
||||
|
||||
<TimelineHome v-if="isMastoInitialised" />
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue