fix: show body if there is no spoiler text (#642)

zio/stable
Daniel Roe 2022-12-29 17:31:04 +01:00 committed by GitHub
parent bc868da226
commit 3afbf712b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -27,11 +27,15 @@ const isFiltered = $computed(() => filterPhrase && (context && context !== 'deta
'bg-fade border-primary-light': isDM,
}"
>
<StatusBody v-if="!isFiltered && status.sensitive && !status.spoilerText" :status="status" :with-action="!isDetails" :class="isDetails ? 'text-xl' : ''" />
<StatusSpoiler :enabled="status.sensitive || isFiltered" :filter="isFiltered">
<template v-if="status.spoilerText || filterPhrase" #spoiler>
<p>{{ status.spoilerText || `${$t('status.filter_hidden_phrase')}: ${filterPhrase}` }}</p>
<template v-if="filterPhrase" #spoiler>
<p>{{ `${$t('status.filter_hidden_phrase')}: ${filterPhrase}` }}</p>
</template>
<StatusBody :status="status" :with-action="!isDetails" :class="isDetails ? 'text-xl' : ''" />
<template v-else-if="status.spoilerText" #spoiler>
<p>{{ status.spoilerText }}</p>
</template>
<StatusBody v-if="!status.sensitive || status.spoilerText" :status="status" :with-action="!isDetails" :class="isDetails ? 'text-xl' : ''" />
<StatusPoll v-if="status.poll" :status="status" />
<StatusMedia
v-if="status.mediaAttachments?.length"