diff options
Diffstat (limited to 'src/components/status_body')
| -rw-r--r-- | src/components/status_body/status_body.js | 15 | ||||
| -rw-r--r-- | src/components/status_body/status_body.scss | 2 | ||||
| -rw-r--r-- | src/components/status_body/status_body.vue | 38 |
3 files changed, 14 insertions, 41 deletions
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index 6dc028a6..94366c6c 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -1,9 +1,7 @@ import fileType from 'src/services/file_type/file_type.service' import RichContent from 'src/components/rich_content/rich_content.jsx' -import MentionsLine from 'src/components/mentions_line/mentions_line.vue' import { mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' -import { set } from 'vue' import { faFile, faMusic, @@ -36,10 +34,7 @@ const StatusContent = { showingTall: this.fullContent || (this.inConversation && this.focused), showingLongSubject: false, // not as computed because it sets the initial state which will be changed later - expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject, - headTailLinks: null, - firstMentions: [], - lastMentions: [] + expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject } }, computed: { @@ -82,8 +77,7 @@ const StatusContent = { ...mapGetters(['mergedConfig']) }, components: { - RichContent, - MentionsLine + RichContent }, mounted () { this.status.attentions && this.status.attentions.forEach(attn => { @@ -99,11 +93,6 @@ const StatusContent = { this.expandingSubject = !this.expandingSubject } }, - setHeadTailLinks (headTailLinks) { - set(this, 'headTailLinks', headTailLinks) - set(this, 'firstMentions', headTailLinks.firstMentions) - set(this, 'lastMentions', headTailLinks.lastMentions) - }, generateTagLink (tag) { return `/tag/${tag}` } diff --git a/src/components/status_body/status_body.scss b/src/components/status_body/status_body.scss index a93c92e0..516ced9d 100644 --- a/src/components/status_body/status_body.scss +++ b/src/components/status_body/status_body.scss @@ -68,7 +68,7 @@ overflow-y: hidden; z-index: 1; - .rich-content-wrapper { + .media-body { min-height: 0; mask: linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat, diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index 6609d989..2be46303 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -1,8 +1,5 @@ <template> -<div - class="StatusBody" - :class="{ '-compact': compact }" -> + <div class="StatusBody"> <div class="body"> <div v-if="status.summary_raw_html" @@ -11,7 +8,6 @@ > <RichContent class="media-body summary" - :single-line="compact" :html="status.summary_raw_html" :emoji="status.emojis" /> @@ -42,29 +38,17 @@ > {{ $t("general.show_more") }} </button> - <span + <RichContent v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)" - class="rich-content-wrapper" - > - <MentionsLine - v-if="!hideMentions && firstMentions && firstMentions.length > 0" - :mentions="firstMentions" - /> - <RichContent - :class="{ '-single-line': singleLine }" - class="text media-body" - :html="status.raw_html" - :emoji="status.emojis" - :handle-links="true" - :single-line="compact" - :greentext="mergedConfig.greentext" - @parseReady="setHeadTailLinks" - /> - <MentionsLine - v-if="!hideMentions && lastMentions.length > 1 && firstMentions.length <= 1" - :mentions="lastMentions" - /> - </span> + :class="{ '-single-line': singleLine }" + class="text media-body" + :html="status.raw_html" + :emoji="status.emojis" + :handle-links="true" + :hide-mentions="hideMentions" + :greentext="mergedConfig.greentext" + @parseReady="$emit('parseReady', $event)" + /> <button v-if="hideSubjectStatus" |
