do the impossible, fix the unfixable
This commit is contained in:
parent
636dbdaba8
commit
c21b1cf898
8 changed files with 118 additions and 41 deletions
|
@ -1,6 +1,5 @@
|
|||
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'
|
||||
|
@ -36,9 +35,6 @@ const StatusContent = {
|
|||
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: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -81,8 +77,7 @@ const StatusContent = {
|
|||
...mapGetters(['mergedConfig'])
|
||||
},
|
||||
components: {
|
||||
RichContent,
|
||||
MentionsLine
|
||||
RichContent
|
||||
},
|
||||
mounted () {
|
||||
this.status.attentions && this.status.attentions.forEach(attn => {
|
||||
|
@ -98,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}`
|
||||
}
|
||||
|
|
|
@ -62,7 +62,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,
|
||||
|
|
|
@ -38,28 +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"
|
||||
: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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue