mirror of
https://github.com/elk-zone/elk
synced 2024-12-12 05:38:04 +09:00
a17d3276d3
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
24 lines
642 B
Vue
24 lines
642 B
Vue
<script setup lang="ts">
|
|
const token = useCookie('nuxtodon-token')
|
|
const router = useRouter()
|
|
if (!token.value)
|
|
router.replace('/public')
|
|
|
|
const masto = await useMasto()
|
|
const { data: timelines } = await useAsyncData('timelines-home', () => masto.timelines.fetchPublic({ local: true }).then(r => r.value))
|
|
</script>
|
|
|
|
<template>
|
|
<MainContent>
|
|
<template #title>
|
|
<div i-ri:group-fill h-6 mr-1 /><span>Local timeline</span>
|
|
</template>
|
|
<template #actions>
|
|
<div color-gray i-ri:equalizer-fill mr-1 h-6 />
|
|
</template>
|
|
<slot>
|
|
<TimelineList :timelines="timelines" />
|
|
</slot>
|
|
</MainContent>
|
|
</template>
|