diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss
index 5b5218f7..eed4d5be 100644
--- a/src/components/mention_link/mention_link.scss
+++ b/src/components/mention_link/mention_link.scss
@@ -40,6 +40,10 @@
.new {
margin-right: 0.25em;
+ &.-firstMention {
+ display: none;
+ }
+
&.-you {
& .shortName,
& .full {
@@ -115,12 +119,6 @@
}
}
- &:not(.-oldPlace) {
- .new.-firstMention {
- display: none;
- }
- }
-
&:hover .new .full {
opacity: 1;
pointer-events: initial;
diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue
index 0dae1f53..d2f4129d 100644
--- a/src/components/mention_link/mention_link.vue
+++ b/src/components/mention_link/mention_link.vue
@@ -23,7 +23,8 @@
@click.prevent="onClick"
>
- {{ $t('status.you')}}
+
+ {{ $t('status.you') }}
({ expanded: false }),
+ components: {
+ MentionLink
+ },
+ computed: {
+ oldStyle () {
+ return this.mergedConfig.mentionsOldStyle
+ },
+ limit () {
+ return 1
+ },
+ mentions () {
+ return this.attentions.slice(0, this.limit)
+ },
+ extraMentions () {
+ return this.attentions.slice(this.limit)
+ },
+ manyMentions () {
+ return this.extraMentions.length > 0
+ },
+ buttonClasses () {
+ return [
+ this.oldStyle
+ ? 'button-unstyled'
+ : 'button-default -sublime',
+ this.oldStyle
+ ? '-oldStyle'
+ : '-newStyle'
+ ]
+ },
+ ...mapGetters(['mergedConfig']),
+ },
+ methods: {
+ toggleShowMore () {
+ this.expanded = !this.expanded
+ }
+ }
+}
+
+export default MentionsLine
diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss
new file mode 100644
index 00000000..735502de
--- /dev/null
+++ b/src/components/mentions_line/mentions_line.scss
@@ -0,0 +1,15 @@
+.MentionsLine {
+ .showMoreLess {
+ &.-newStyle {
+ line-height: 1.5;
+ font-size: inherit;
+ display: inline-block;
+ padding-top: 0;
+ padding-bottom: 0;
+ }
+
+ &.-oldStyle {
+ color: var(--link);
+ }
+ }
+}
diff --git a/src/components/mentions_line/mentions_line.vue b/src/components/mentions_line/mentions_line.vue
new file mode 100644
index 00000000..6d114f2d
--- /dev/null
+++ b/src/components/mentions_line/mentions_line.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 7d2ec514..d921f625 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -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 &&
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index d0fb150d..faf67328 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -310,13 +310,9 @@
{{ $t('status.mentions') }}
-
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js
index 232afccb..0c1aa88e 100644
--- a/src/components/status_body/status_body.js
+++ b/src/components/status_body/status_body.js
@@ -1,5 +1,6 @@
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 { processHtml } from 'src/services/tiny_post_html_processor/tiny_post_html_processor.service.js'
import { extractTagFromUrl } from 'src/services/matcher/matcher.service.js'
import { mapGetters } from 'vuex'
@@ -104,10 +105,17 @@ const StatusContent = {
attachmentTypes () {
return this.status.attachments.map(file => fileType.fileType(file.mimetype))
},
+ mentionsOldPlace () {
+ return this.mergedConfig.mentionsOldPlace
+ },
+ mentions () {
+ return this.status.attentions
+ },
...mapGetters(['mergedConfig'])
},
components: {
- RichContent
+ RichContent,
+ MentionsLine
},
mounted () {
this.status.attentions && this.status.attentions.forEach(attn => {
diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue
index 6f982f2e..92e47118 100644
--- a/src/components/status_body/status_body.vue
+++ b/src/components/status_body/status_body.vue
@@ -39,15 +39,24 @@
>
{{ $t("general.show_more") }}
-
+ >
+
+
+
+