feat: basic conversations (#15)

This commit is contained in:
patak 2022-11-18 10:37:22 +01:00 committed by GitHub
parent 4fc6e405e0
commit 1aa81a3a0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 82 additions and 13 deletions

View file

@ -12,10 +12,11 @@ const { data: context } = await useAsyncData(`${id}-context`, () => masto.status
</script>
<template>
<template v-for="comment of context?.ancestors" :key="comment.id">
<StatusCard :status="comment" border="t border" pt-4 />
</template>
<StatusDetails :status="status" />
<template v-for="comment of context?.descendants" :key="comment.id">
<StatusCard :status="comment" border="t border" pt-4 />
</template>
<pre>{{ status }}</pre>
<pre>{{ context }}</pre>
</template>

22
pages/conversations.vue Normal file
View file

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