diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 0930e0990..a531b35d3 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -247,6 +247,7 @@ diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index aa334499e..e89d1d173 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -22,6 +22,7 @@ const StatusContent = { name: 'StatusContent', props: [ 'compact', + 'collapse', // replaces newlines with spaces 'status', 'focused', 'noHeading', @@ -95,6 +96,9 @@ const StatusContent = { attachmentTypes () { return this.status.attachments.map(file => fileType.fileType(file.mimetype)) }, + collapsedStatus () { + return this.status.raw_html.replace(/(\n|)/g, ' ') + }, ...mapGetters(['mergedConfig']) }, components: { diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index 0fc024b04..1035d04c6 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -38,7 +38,7 @@ v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)" :class="{ '-single-line': singleLine }" class="text media-body" - :html="status.raw_html" + :html="collapse ? collapsedStatus : status.raw_html" :emoji="status.emojis" :handle-links="true" :faint="compact" diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 64a1d6a53..6f5b1d613 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -14,6 +14,7 @@ :toggle-showing-tall="toggleShowingTall" :toggle-expanding-subject="toggleExpandingSubject" :toggle-showing-long-subject="toggleShowingLongSubject" + :collapse="true" @parse-ready="$emit('parseReady', $event)" >