feat: stream tags, home, and public timelines (#190)
This commit is contained in:
parent
d94bed686b
commit
5560fe66cc
7 changed files with 55 additions and 16 deletions
|
@ -12,6 +12,8 @@ if (useRoute().path === '/signin/callback') {
|
|||
}
|
||||
|
||||
const paginator = useMasto().timelines.getHomeIterable()
|
||||
const stream = await useMasto().stream.streamUser()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
const { t } = useI18n()
|
||||
useHead({
|
||||
|
@ -26,7 +28,7 @@ useHead({
|
|||
</template>
|
||||
<slot>
|
||||
<PublishWidget draft-key="home" border="b base" />
|
||||
<TimelinePaginator :paginator="paginator" />
|
||||
<TimelinePaginator v-bind="{ paginator, stream }" />
|
||||
</slot>
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const paginator = useMasto().timelines.getPublicIterable()
|
||||
const stream = await useMasto().stream.streamPublicTimeline()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
useHead({
|
||||
title: 'Federated',
|
||||
|
@ -13,7 +15,7 @@ useHead({
|
|||
</template>
|
||||
|
||||
<slot>
|
||||
<TimelinePaginator :paginator="paginator" />
|
||||
<TimelinePaginator v-bind="{ paginator, stream }" />
|
||||
</slot>
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
const paginator = useMasto().timelines.getPublicIterable({ local: true })
|
||||
const stream = await useMasto().stream.streamCommunityTimeline()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
useHead({
|
||||
title: 'Local',
|
||||
|
@ -13,7 +15,7 @@ useHead({
|
|||
</template>
|
||||
|
||||
<slot>
|
||||
<TimelinePaginator :paginator="paginator" />
|
||||
<TimelinePaginator v-bind="{ paginator, stream }" />
|
||||
</slot>
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
|
@ -3,6 +3,8 @@ const params = useRoute().params
|
|||
const tag = $(computedEager(() => params.tag as string))
|
||||
|
||||
const paginator = useMasto().timelines.getHashtagIterable(tag)
|
||||
const stream = await useMasto().stream.streamTagTimeline(tag)
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
useHead({
|
||||
title: `#${tag}`,
|
||||
|
@ -16,7 +18,7 @@ useHead({
|
|||
</template>
|
||||
|
||||
<slot>
|
||||
<TimelinePaginator :paginator="paginator" />
|
||||
<TimelinePaginator v-bind="{ paginator, stream }" />
|
||||
</slot>
|
||||
</MainContent>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue