2022-11-13 19:05:32 +03:00
|
|
|
<script setup lang="ts">
|
2022-11-23 02:42:20 +03:00
|
|
|
import AccountAvatar from '~~/components/account/AccountAvatar.vue'
|
|
|
|
|
2022-11-13 19:05:32 +03:00
|
|
|
const params = useRoute().params
|
2022-11-14 17:54:30 +03:00
|
|
|
const id = computed(() => params.post as string)
|
2022-11-14 06:33:09 +03:00
|
|
|
|
2022-11-14 17:54:30 +03: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 19:05:32 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-21 16:21:53 +03:00
|
|
|
<template v-if="status">
|
|
|
|
<template v-for="comment of context?.ancestors" :key="comment.id">
|
|
|
|
<StatusCard :status="comment" border="t border" pt-4 />
|
|
|
|
</template>
|
|
|
|
<StatusDetails :status="status" border="t border" pt-4 />
|
2022-11-23 02:42:20 +03:00
|
|
|
<div v-if="currentUser" border="t border" p6 flex gap-4>
|
|
|
|
<AccountAvatar :account="currentUser.account" w-10 h-10 />
|
2022-11-21 16:21:53 +03:00
|
|
|
<PublishWidget
|
|
|
|
w-full
|
|
|
|
:draft-key="`reply-${id}`"
|
2022-11-21 18:07:55 +03:00
|
|
|
:placeholder="`Reply to ${status?.account ? getDisplayName(status?.account) : 'this thread'}`"
|
2022-11-21 16:21:53 +03:00
|
|
|
:in-reply-to-id="id"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<template v-for="comment of context?.descendants" :key="comment.id">
|
|
|
|
<StatusCard :status="comment" border="t border" pt-4 />
|
|
|
|
</template>
|
2022-11-18 12:37:22 +03:00
|
|
|
</template>
|
2022-11-21 09:55:31 +03:00
|
|
|
|
2022-11-21 16:21:53 +03:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
Status not found
|
|
|
|
</div>
|
2022-11-14 17:54:30 +03:00
|
|
|
</template>
|
2022-11-13 19:05:32 +03:00
|
|
|
</template>
|