aboutsummaryrefslogtreecommitdiff
path: root/src/components/mentions_line
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mentions_line')
-rw-r--r--src/components/mentions_line/mentions_line.js22
-rw-r--r--src/components/mentions_line/mentions_line.scss15
-rw-r--r--src/components/mentions_line/mentions_line.vue6
3 files changed, 10 insertions, 33 deletions
diff --git a/src/components/mentions_line/mentions_line.js b/src/components/mentions_line/mentions_line.js
index e52045ec..a4a0c724 100644
--- a/src/components/mentions_line/mentions_line.js
+++ b/src/components/mentions_line/mentions_line.js
@@ -1,6 +1,8 @@
import MentionLink from 'src/components/mention_link/mention_link.vue'
import { mapGetters } from 'vuex'
+export const MENTIONS_LIMIT = 5
+
const MentionsLine = {
name: 'MentionsLine',
props: {
@@ -14,31 +16,15 @@ const MentionsLine = {
MentionLink
},
computed: {
- oldStyle () {
- return !this.mergedConfig.mentionsNewStyle
- },
- limit () {
- return 6
- },
mentionsComputed () {
- return this.mentions.slice(0, this.limit)
+ return this.mentions.slice(0, MENTIONS_LIMIT)
},
extraMentions () {
- return this.mentions.slice(this.limit)
+ return this.mentions.slice(MENTIONS_LIMIT)
},
manyMentions () {
return this.extraMentions.length > 0
},
- buttonClasses () {
- return [
- this.oldStyle
- ? 'button-unstyled'
- : 'button-default -sublime',
- this.oldStyle
- ? '-oldStyle'
- : '-newStyle'
- ]
- },
...mapGetters(['mergedConfig'])
},
methods: {
diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss
index 90d1e0a4..222940c8 100644
--- a/src/components/mentions_line/mentions_line.scss
+++ b/src/components/mentions_line/mentions_line.scss
@@ -1,17 +1,10 @@
.MentionsLine {
.showMoreLess {
white-space: normal;
+ color: var(--link);
+ }
- &.-newStyle {
- line-height: 1.5;
- font-size: inherit;
- display: inline-block;
- padding-top: 0;
- padding-bottom: 0;
- }
-
- &.-oldStyle {
- color: var(--link);
- }
+ .mention-link:not(:last-child) {
+ margin-right: 0.25em;
}
}
diff --git a/src/components/mentions_line/mentions_line.vue b/src/components/mentions_line/mentions_line.vue
index f4b3abb9..f375e3b0 100644
--- a/src/components/mentions_line/mentions_line.vue
+++ b/src/components/mentions_line/mentions_line.vue
@@ -25,15 +25,13 @@
/>
</span><button
v-if="!expanded"
- class="showMoreLess"
- :class="buttonClasses"
+ class="button-unstyled showMoreLess"
@click="toggleShowMore"
>
{{ $t('status.plus_more', { number: extraMentions.length }) }}
</button><button
v-if="expanded"
- class="showMoreLess"
- :class="buttonClasses"
+ class="button-unstyled showMoreLess"
@click="toggleShowMore"
>
{{ $t('general.show_less') }}