feat: favourites (#8)

This commit is contained in:
patak 2022-11-15 22:21:39 +01:00 committed by GitHub
parent f3ea4b1f3b
commit b455c37c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View file

@ -28,7 +28,7 @@
<div i-ri:at-line />
<span>Direct Messages</span>
</NuxtLink>
<NuxtLink flex gap2 items-center>
<NuxtLink flex gap2 items-center to="/favourites">
<div i-ri:heart-3-line />
<span>Favorites</span>
</NuxtLink>

22
pages/favourites.vue Normal file
View file

@ -0,0 +1,22 @@
<script setup lang="ts">
definePageMeta({
middleware: 'auth',
})
const masto = await useMasto()
const paginator = masto.favourites.getIterator()
</script>
<template>
<MainContent>
<template #title>
<div i-ri:heart-fill h-6 mr-1 /><span>Favourites</span>
</template>
<template #actions>
<div color-gray i-ri:equalizer-fill mr-1 h-6 />
</template>
<slot>
<TimelinePaginator :paginator="paginator" />
</slot>
</MainContent>
</template>