2022-11-23 00:00:52 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import type { Status } from 'masto'
|
|
|
|
|
|
|
|
const { status } = defineProps<{
|
|
|
|
status: Status
|
|
|
|
}>()
|
|
|
|
|
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>
|
2022-12-22 21:39:07 +00:00
|
|
|
<div v-if="status.inReplyToAccountId" flex="~ wrap" gap-1 items-end>
|
2022-12-06 11:07:17 +00:00
|
|
|
<NuxtLink
|
|
|
|
v-if="status.inReplyToId"
|
2022-12-22 21:39:07 +00:00
|
|
|
flex="~" items-center h-auto font-bold text-sm text-secondary gap-1
|
2022-12-06 11:07:17 +00:00
|
|
|
:to="getStatusInReplyToRoute(status)"
|
|
|
|
:title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'"
|
|
|
|
>
|
|
|
|
<div i-ri:reply-fill class="scale-x-[-1]" text-secondary-light />
|
2022-12-29 13:11:05 +00:00
|
|
|
<template v-if="!isSelf">
|
2022-12-06 11:07:17 +00:00
|
|
|
<AccountInlineInfo v-if="account" :account="account" :link="false" />
|
2022-12-06 16:37:58 +00:00
|
|
|
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
|
2022-12-06 11:07:17 +00:00
|
|
|
</template>
|
2022-12-06 16:37:58 +00:00
|
|
|
<span v-else ws-nowrap>{{ $t('status.thread') }}</span>
|
2022-12-06 11:07:17 +00:00
|
|
|
<div i-ph:chats-fill text-primary text-lg />
|
|
|
|
</NuxtLink>
|
|
|
|
</div>
|
2022-11-23 00:00:52 +00:00
|
|
|
</template>
|