elk/components/status/StatusReplyingTo.vue

29 lines
970 B
Vue
Raw Normal View History

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