2022-11-23 00:00:52 +00:00
|
|
|
<script setup lang="ts">
|
2023-01-08 06:21:09 +00:00
|
|
|
import type { mastodon } from 'masto'
|
2022-11-23 00:00:52 +00:00
|
|
|
|
2023-01-08 08:27:21 +00:00
|
|
|
const {
|
|
|
|
status,
|
|
|
|
isSelfReply = false,
|
|
|
|
} = defineProps<{
|
2023-01-08 06:21:09 +00:00
|
|
|
status: mastodon.v1.Status
|
2023-01-08 08:27:21 +00:00
|
|
|
isSelfReply: boolean
|
2022-11-23 00:00:52 +00:00
|
|
|
}>()
|
|
|
|
|
2022-12-29 13:11:05 +00:00
|
|
|
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
|
|
|
|
const account = isSelf ? computed(() => status.account) : useAccountById(status.inReplyToAccountId)
|
2022-11-23 00:00:52 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-08 08:27:21 +00:00
|
|
|
<NuxtLink
|
|
|
|
v-if="status.inReplyToId"
|
|
|
|
flex="~ gap2" items-center h-auto text-sm text-secondary
|
|
|
|
:to="getStatusInReplyToRoute(status)"
|
|
|
|
:title=" $t('status.replying_to', [account ? getDisplayName(account) : $t('status.someone')])"
|
|
|
|
>
|
|
|
|
<template v-if="isSelfReply">
|
|
|
|
<span btn-text p0 mb-1>{{ $t('status.show_full_thread') }}</span>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<div i-ri-chat-1-line />
|
|
|
|
<i18n-t keypath="status.replying_to">
|
|
|
|
<template v-if="account">
|
|
|
|
<AccountInlineInfo :account="account" :link="false" mx1 />
|
2022-12-29 13:21:11 +00:00
|
|
|
</template>
|
2023-01-08 08:27:21 +00:00
|
|
|
<template v-else>
|
|
|
|
{{ $t('status.someone') }}
|
|
|
|
</template>
|
|
|
|
</i18n-t>
|
|
|
|
</template>
|
|
|
|
</NuxtLink>
|
2022-11-23 00:00:52 +00:00
|
|
|
</template>
|