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