fix: wrap non-sensitive spoilers in spoiler status (#1864)
This commit is contained in:
parent
bc09a28af6
commit
69c1bd8b6a
@ -20,7 +20,7 @@ const isFiltered = $computed(() => status.account.id !== currentUser.value?.acco
|
||||
|
||||
// check spoiler text or media attachment
|
||||
// needed to handle accounts that mark all their posts as sensitive
|
||||
const hasSensitiveSpoilerOrMedia = $computed(() => status.sensitive && (!!status.spoilerText || !!status.mediaAttachments.length))
|
||||
const hasSpoilerOrSensitiveMedia = $computed(() => !!status.spoilerText || (status.sensitive && !!status.mediaAttachments.length))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -32,7 +32,7 @@ const hasSensitiveSpoilerOrMedia = $computed(() => status.sensitive && (!!status
|
||||
}"
|
||||
>
|
||||
<StatusBody v-if="!isFiltered && status.sensitive && !status.spoilerText" :status="status" :newer="newer" :with-action="!isDetails" :class="isDetails ? 'text-xl' : ''" />
|
||||
<StatusSpoiler :enabled="hasSensitiveSpoilerOrMedia || isFiltered" :filter="isFiltered" :is-d-m="isDM">
|
||||
<StatusSpoiler :enabled="hasSpoilerOrSensitiveMedia || isFiltered" :filter="isFiltered" :is-d-m="isDM">
|
||||
<template v-if="status.spoilerText" #spoiler>
|
||||
<p>{{ status.spoilerText }}</p>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user