feat: move timelines to components (#514)

This commit is contained in:
patak 2022-12-22 18:48:41 +01:00 committed by GitHub
parent 6b7a8baa8e
commit fef082af13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 123 additions and 68 deletions

View file

@ -11,10 +11,6 @@ if (useRoute().path === '/signin/callback') {
useRouter().push('/home')
}
const paginator = useMasto().timelines.iterateHome()
const stream = await useMasto().stream.streamUser()
onBeforeUnmount(() => stream.disconnect())
const { t } = useI18n()
useHeadFixed({
title: () => t('nav_side.home'),
@ -29,9 +25,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>