mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-19 23:40:07 +00:00
feat: support paginator in local timeline
This commit is contained in:
parent
696ddb2bad
commit
eb3f2ab771
3 changed files with 7 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"extends": "@antfu"
|
"extends": "@antfu",
|
||||||
|
"ignorePatterns": ["!pages/public"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { data: timelines } = await useAsyncData('timelines-home', () => masto.timelines.fetchPublic({ local: true }).then(r => r.value))
|
const paginator = masto.timelines.getPublicIterable({ local: true })
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: 'Local'
|
title: 'Local',
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ useHead({
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<slot>
|
<slot>
|
||||||
<TimelineList :timelines="timelines" />
|
<TimelinePaginator :paginator="paginator" />
|
||||||
</slot>
|
</slot>
|
||||||
</MainContent>
|
</MainContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,7 +10,7 @@ definePageMeta({
|
||||||
status,
|
status,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue