forked from Mirrors/elk
fix: wrap non-sensitive spoilers in spoiler status (#1864)
This commit is contained in:
parent
bc09a28af6
commit
69c1bd8b6a
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ const isFiltered = $computed(() => status.account.id !== currentUser.value?.acco
|
||||||
|
|
||||||
// check spoiler text or media attachment
|
// check spoiler text or media attachment
|
||||||
// needed to handle accounts that mark all their posts as sensitive
|
// 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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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' : ''" />
|
<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>
|
<template v-if="status.spoilerText" #spoiler>
|
||||||
<p>{{ status.spoilerText }}</p>
|
<p>{{ status.spoilerText }}</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue