feat: simplify replying to badge when it's the same as reblogger

This commit is contained in:
patak 2022-12-29 14:35:28 +01:00
parent 2a4e1bf8f6
commit 28af2f2efc
2 changed files with 10 additions and 4 deletions

View file

@ -1,9 +1,10 @@
<script setup lang="ts">
import type { Status } from 'masto'
const { status, collapsed = false } = defineProps<{
const { status, collapsed = false, simplified = false } = defineProps<{
status: Status
collapsed: boolean
simplified: boolean
}>()
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
@ -21,8 +22,8 @@ const account = isSelf ? computed(() => status.account) : useAccountById(status.
<template v-if="account">
<div i-ri:reply-fill :class="collapsed ? '' : 'scale-x-[-1]'" text-secondary-light />
<template v-if="!isSelf">
<AccountInlineInfo v-if="account" :account="account" :link="false" />
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
<AccountAvatar v-if="simplified" :account="account" :link="false" w-5 h-5 />
<AccountInlineInfo v-else :account="account" :link="false" />
</template>
<span v-else-if="!collapsed" ws-nowrap>{{ $t('status.thread') }}</span>
</template>