2022-11-13 16:05:32 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
const params = useRoute().params
|
2022-11-14 14:54:30 +00:00
|
|
|
const id = computed(() => params.post as string)
|
2022-11-14 03:33:09 +00:00
|
|
|
|
|
|
|
const masto = await useMasto()
|
2022-11-14 14:54:30 +00:00
|
|
|
const { data: status } = await useAsyncData(`${id}-status`, () => masto.statuses.fetch(params.post as string))
|
|
|
|
const { data: context } = await useAsyncData(`${id}-context`, () => masto.statuses.fetchContext(params.post as string))
|
2022-11-13 16:05:32 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-18 09:37:22 +00:00
|
|
|
<template v-for="comment of context?.ancestors" :key="comment.id">
|
|
|
|
<StatusCard :status="comment" border="t border" pt-4 />
|
|
|
|
</template>
|
2022-11-20 21:25:26 +00:00
|
|
|
<StatusDetails :status="status" border="t border" pt-4 />
|
2022-11-21 06:55:31 +00:00
|
|
|
<div border="t border" p6 flex gap-4>
|
|
|
|
<img :src="status?.account.avatar" rounded w-10 h-10 bg-gray:10>
|
|
|
|
<PublishWidget
|
|
|
|
w-full
|
|
|
|
:draft-key="`reply-${id}`"
|
|
|
|
:placeholder="`Reply to ${status?.account?.displayName || status?.account?.acct || 'this thread'}`"
|
|
|
|
:in-reply-to-id="id"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
2022-11-14 14:54:30 +00:00
|
|
|
<template v-for="comment of context?.descendants" :key="comment.id">
|
2022-11-21 06:55:31 +00:00
|
|
|
<StatusCard :status="comment" border="t border" pt-4 />
|
2022-11-14 14:54:30 +00:00
|
|
|
</template>
|
2022-11-13 16:05:32 +00:00
|
|
|
</template>
|