2022-11-14 01:05:32 +09:00
|
|
|
<script setup lang="ts">
|
|
|
|
const props = defineProps<{
|
|
|
|
modelValue?: boolean
|
|
|
|
}>()
|
|
|
|
|
|
|
|
const params = useRoute().params
|
2022-11-14 23:54:30 +09:00
|
|
|
const id = computed(() => params.post as string)
|
2022-11-14 12:33:09 +09:00
|
|
|
|
|
|
|
const masto = await useMasto()
|
2022-11-14 23:54:30 +09: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-14 01:05:32 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-14 23:54:30 +09:00
|
|
|
<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>
|
2022-11-14 01:05:32 +09:00
|
|
|
</template>
|