feat: initial support for lists (#1474)

This commit is contained in:
Evan Boehs 2023-01-26 16:41:28 -05:00 committed by GitHub
parent 901463301c
commit 3904bc4d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<script lang="ts" setup>
const { t } = useI18n()
const { client } = $(useMasto())
const paginator = client.v1.lists.list()
useHeadFixed({
title: () => t('nav.lists'),
})
</script>
<template>
<MainContent>
<template #title>
<NuxtLink to="/lists" timeline-title-style flex items-center gap-2 @click="$scrollToTop">
<div i-ri:list-check />
<span text-lg font-bold>{{ t('nav.lists') }}</span>
</NuxtLink>
</template>
<slot>
<CommonPaginator :paginator="paginator">
<template #default="{ item }">
<NuxtLink :to="`list/${item.id}`" block p4 hover:bg-active flex justify-between>
{{ item.title }}
</NuxtLink>
</template>
</CommonPaginator>
</slot>
</MainContent>
</template>