1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-28 14:58:10 +09:00
elk/components/status/StatusReplyingTo.vue

24 lines
660 B
Vue
Raw Normal View History

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