moved mentions into a separate component - MentionLine, added collapsing

of mentions when there's too many of 'em
This commit is contained in:
Henry Jameson 2021-06-08 14:34:47 +03:00
parent 73127f0e25
commit 2f383c2c01
10 changed files with 151 additions and 28 deletions

View file

@ -13,6 +13,7 @@ import RichContent from 'src/components/rich_content/rich_content.jsx'
import StatusPopover from '../status_popover/status_popover.vue'
import UserListPopover from '../user_list_popover/user_list_popover.vue'
import EmojiReactions from '../emoji_reactions/emoji_reactions.vue'
import MentionsLine from 'src/components/mentions_line/mentions_line.vue'
import MentionLink from 'src/components/mention_link/mention_link.vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
@ -74,7 +75,8 @@ const Status = {
EmojiReactions,
StatusContent,
RichContent,
MentionLink
MentionLink,
MentionsLine
},
props: [
'statusoid',
@ -105,9 +107,6 @@ const Status = {
muteWords () {
return this.mergedConfig.muteWords
},
mentionsOldPlace () {
return this.mergedConfig.mentionsOldPlace
},
showReasonMutedThread () {
return (
this.status.thread_muted ||
@ -164,6 +163,9 @@ const Status = {
muteWordHits () {
return muteWordHits(this.status, this.muteWords)
},
mentionsOldPlace () {
return this.mergedConfig.mentionsOldPlace
},
mentions () {
return this.statusoid.attentions.filter(attn => {
return attn.screen_name !== this.replyToName &&