make favs etc strip newlines so status is more visible

This commit is contained in:
Henry Jameson 2025-08-14 12:31:12 +03:00
commit a6c844e522
4 changed files with 7 additions and 1 deletions

View file

@ -247,6 +247,7 @@
<StatusContent <StatusContent
:compact="!statusExpanded" :compact="!statusExpanded"
:status="notification.status" :status="notification.status"
:collapse="true"
/> />
</template> </template>
</div> </div>

View file

@ -22,6 +22,7 @@ const StatusContent = {
name: 'StatusContent', name: 'StatusContent',
props: [ props: [
'compact', 'compact',
'collapse', // replaces newlines with spaces
'status', 'status',
'focused', 'focused',
'noHeading', 'noHeading',
@ -95,6 +96,9 @@ const StatusContent = {
attachmentTypes () { attachmentTypes () {
return this.status.attachments.map(file => fileType.fileType(file.mimetype)) return this.status.attachments.map(file => fileType.fileType(file.mimetype))
}, },
collapsedStatus () {
return this.status.raw_html.replace(/(\n|<br\s?\/?>)/g, ' ')
},
...mapGetters(['mergedConfig']) ...mapGetters(['mergedConfig'])
}, },
components: { components: {

View file

@ -38,7 +38,7 @@
v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)" v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)"
:class="{ '-single-line': singleLine }" :class="{ '-single-line': singleLine }"
class="text media-body" class="text media-body"
:html="status.raw_html" :html="collapse ? collapsedStatus : status.raw_html"
:emoji="status.emojis" :emoji="status.emojis"
:handle-links="true" :handle-links="true"
:faint="compact" :faint="compact"

View file

@ -14,6 +14,7 @@
:toggle-showing-tall="toggleShowingTall" :toggle-showing-tall="toggleShowingTall"
:toggle-expanding-subject="toggleExpandingSubject" :toggle-expanding-subject="toggleExpandingSubject"
:toggle-showing-long-subject="toggleShowingLongSubject" :toggle-showing-long-subject="toggleShowingLongSubject"
:collapse="true"
@parse-ready="$emit('parseReady', $event)" @parse-ready="$emit('parseReady', $event)"
> >
<div v-if="status.poll && status.poll.options && !compact"> <div v-if="status.poll && status.poll.options && !compact">