Merge branch 'better-still-emoji' into shigusegubu

* better-still-emoji:
  change defaults
  bump limit to a saner one
  moved mentions into a separate component - MentionLine, added collapsing of mentions when there's too many of 'em
  fix empty spaces again
  configurable mentions placement
  moving mentions into separate row
  moved transparent button styles into button itself
This commit is contained in:
Henry Jameson 2021-06-08 16:34:12 +03:00
commit 59d8a3bd92
16 changed files with 289 additions and 56 deletions

View file

@ -13,6 +13,8 @@ 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'
import { muteWordHits } from '../../services/status_parser/status_parser.js'
@ -33,7 +35,8 @@ import {
faStar,
faEyeSlash,
faEye,
faThumbtack
faThumbtack,
faAt,
} from '@fortawesome/free-solid-svg-icons'
library.add(
@ -50,7 +53,8 @@ library.add(
faEllipsisH,
faEyeSlash,
faEye,
faThumbtack
faThumbtack,
faAt
)
const Status = {
@ -70,7 +74,9 @@ const Status = {
UserListPopover,
EmojiReactions,
StatusContent,
RichContent
RichContent,
MentionLink,
MentionsLine
},
props: [
'statusoid',
@ -133,9 +139,7 @@ const Status = {
return this.generateUserProfileLink(this.status.user.id, this.status.user.screen_name)
},
replyProfileLink () {
if (this.isReply) {
return this.generateUserProfileLink(this.status.in_reply_to_user_id, this.replyToName)
}
return this.$store.getters.findUser(this.status.in_reply_to_user_id).statusnet_profile_url
},
retweet () { return !!this.statusoid.retweeted_status },
retweeterUser () { return this.statusoid.user },
@ -159,6 +163,18 @@ const Status = {
muteWordHits () {
return muteWordHits(this.status, this.muteWords)
},
mentionsOwnLine () {
return this.mergedConfig.mentionsOwnLine
},
mentions () {
return this.statusoid.attentions.filter(attn => {
return attn.screen_name !== this.replyToName &&
attn.screen_name !== this.statusoid.user.screen_name
})
},
hasMentions () {
return this.mentions.length > 0
},
muted () {
if (this.statusoid.user.id === this.currentUser.id) return false
const reasonsToMute = this.userIsMuted ||