mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-15 15:41:47 +03:00
28 lines
1.1 KiB
Vue
28 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
const params = useRoute().params
|
|
const id = computed(() => params.post as string)
|
|
|
|
const masto = await useMasto()
|
|
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))
|
|
</script>
|
|
|
|
<template>
|
|
<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 />
|
|
<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>
|
|
|
|
<template v-for="comment of context?.descendants" :key="comment.id">
|
|
<StatusCard :status="comment" border="t border" pt-4 />
|
|
</template>
|
|
</template>
|