2022-11-23 01:00:52 +01:00
|
|
|
<script setup lang="ts">
|
2023-01-08 07:21:09 +01:00
|
|
|
import type { mastodon } from 'masto'
|
2022-11-23 01:00:52 +01:00
|
|
|
|
2022-12-29 14:35:28 +01:00
|
|
|
const { status, collapsed = false, simplified = false } = defineProps<{
|
2023-01-08 07:21:09 +01:00
|
|
|
status: mastodon.v1.Status
|
2022-12-29 14:50:11 +01:00
|
|
|
collapsed?: boolean
|
|
|
|
simplified?: boolean
|
2022-11-23 01:00:52 +01:00
|
|
|
}>()
|
|
|
|
|
2022-12-29 14:11:05 +01:00
|
|
|
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
|
|
|
|
const account = isSelf ? computed(() => status.account) : useAccountById(status.inReplyToAccountId)
|
2022-11-23 01:00:52 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-12-22 22:39:07 +01:00
|
|
|
<div v-if="status.inReplyToAccountId" flex="~ wrap" gap-1 items-end>
|
2022-12-06 12:07:17 +01:00
|
|
|
<NuxtLink
|
|
|
|
v-if="status.inReplyToId"
|
2022-12-22 22:39:07 +01:00
|
|
|
flex="~" items-center h-auto font-bold text-sm text-secondary gap-1
|
2022-12-06 12:07:17 +01:00
|
|
|
:to="getStatusInReplyToRoute(status)"
|
2023-01-07 21:27:28 +01:00
|
|
|
:title="$t('status.replying_to', [account ? getDisplayName(account) : $t('status.someone')])"
|
2022-12-06 12:07:17 +01:00
|
|
|
>
|
2022-12-29 14:21:11 +01:00
|
|
|
<template v-if="account">
|
2022-12-29 20:40:59 +01:00
|
|
|
<div i-ri:reply-fill :class="collapsed ? '' : 'scale-x-[-1]'" text-secondary-light />
|
|
|
|
<template v-if="!collapsed">
|
2023-01-08 08:49:32 +01:00
|
|
|
<AccountAvatar v-if="isSelf || simplified || status.inReplyToAccountId === currentUser?.account.id" :account="account" :link="false" w-5 h-5 mx="0.5" />
|
|
|
|
<AccountInlineInfo v-else :account="account" :link="false" mx="0.5" />
|
2022-12-29 14:21:11 +01:00
|
|
|
</template>
|
2022-12-06 12:07:17 +01:00
|
|
|
</template>
|
2023-01-05 23:56:28 +01:00
|
|
|
<div i-ri:question-answer-line text-secondary-light text-lg />
|
2022-12-06 12:07:17 +01:00
|
|
|
</NuxtLink>
|
|
|
|
</div>
|
2022-11-23 01:00:52 +01:00
|
|
|
</template>
|