feat: collpase self thread when possible
This commit is contained in:
parent
3922db012f
commit
2a4e1bf8f6
2 changed files with 14 additions and 7 deletions
|
@ -1,8 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import type { Status } from 'masto'
|
||||
|
||||
const { status } = defineProps<{
|
||||
const { status, collapsed = false } = defineProps<{
|
||||
status: Status
|
||||
collapsed: boolean
|
||||
}>()
|
||||
|
||||
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
|
||||
|
@ -17,12 +18,14 @@ const account = isSelf ? computed(() => status.account) : useAccountById(status.
|
|||
: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="!isSelf">
|
||||
<AccountInlineInfo v-if="account" :account="account" :link="false" />
|
||||
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
|
||||
<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>
|
||||
</template>
|
||||
<span v-else-if="!collapsed" ws-nowrap>{{ $t('status.thread') }}</span>
|
||||
</template>
|
||||
<span v-else ws-nowrap>{{ $t('status.thread') }}</span>
|
||||
<div i-ph:chats-fill text-primary text-lg />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue