Compare commits

..

No commits in common. "77b5fe003ec271a9fa879be35a533fd9c9cfccd0" and "c97ccd4de542cdc9db0b3094e8428158d4e2deb5" have entirely different histories.

4 changed files with 22 additions and 4 deletions

View file

@ -468,7 +468,7 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
app.use(pinia)
app.config.errorHandler = (error, instance, info) => {
console.error('Global Vue Error Handler caught an error:', error, instance, info)
console.error('GLOBAL ERROR HANDLER', error, instance, info)
useInterfaceStore().setGlobalError({ error, instance, info })
}

View file

@ -69,6 +69,15 @@ const Draft = {
localCollapseSubjectDefault() {
return useMergedConfigStore().mergedConfig.collapseMessageWithSubject
},
nsfwClickthrough() {
if (!this.draft.nsfw) {
return false
}
if (this.draft.summary && this.localCollapseSubjectDefault) {
return false
}
return true
},
},
watch: {
editing(newVal) {

View file

@ -69,6 +69,15 @@ const StatusContent = {
(this.mergedConfig.hideAttachmentsInConv && this.inConversation))
)
},
nsfwClickthrough() {
if (!this.status.nsfw) {
return false
}
if (this.status.summary && this.mergedConfig.collapseMessageWithSubject) {
return false
}
return true
},
attachmentSize() {
if (this.compact) {
return 'small'

View file

@ -33,7 +33,7 @@
v-if="status.attachments.length !== 0"
class="attachments media-body"
:compact="compact"
:nsfw="status.nsfw"
:nsfw="nsfwClickthrough"
:attachments="status.attachments"
:limit="compact ? 1 : 0"
:size="attachmentSize"
@ -45,10 +45,10 @@
v-if="statusCard && !compact"
class="link-preview media-body"
>
<LinkPreview
<link-preview
:card="status.card"
:size="attachmentSize"
:nsfw="status.nsfw"
:nsfw="nsfwClickthrough"
/>
</div>
</StatusBody>