elk/components/status/StatusReplyingTo.vue

23 lines
636 B
Vue
Raw Normal View History

2022-11-23 03:00:52 +03:00
<script setup lang="ts">
import type { Status } from 'masto'
const { status } = defineProps<{
status: Status
}>()
2022-11-30 10:08:10 +03:00
const account = useAccountById(status.inReplyToAccountId!)
2022-11-23 03:00:52 +03:00
</script>
<template>
2022-11-24 11:57:24 +03:00
<NuxtLink
v-if="status.inReplyToId"
flex="~ wrap" items-center text-sm text-secondary
:to="getStatusInReplyToRoute(status)"
2022-11-24 11:57:24 +03:00
:title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'"
>
2022-11-26 23:48:06 +03:00
<div i-ri:reply-fill rotate-180 text-secondary-light class="mr-1.5" />
2022-11-24 11:57:24 +03:00
<AccountInlineInfo v-if="account" :account="account" :link="false" />
<span v-else>Someone</span>
</NuxtLink>
2022-11-23 03:00:52 +03:00
</template>