aboutsummaryrefslogtreecommitdiff
path: root/src/components/mention_link
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2021-06-08 11:38:44 +0300
committerHenry Jameson <me@hjkos.com>2021-06-08 11:38:44 +0300
commit3abd357694c29c84d213d7d2a7a954ab2a591da0 (patch)
tree99aeb473297ff303198ce7134369ede5de0cbb9e /src/components/mention_link
parent0583a6b8638afc6b3ea07adceecdb42ca9188251 (diff)
moving mentions into separate row
Diffstat (limited to 'src/components/mention_link')
-rw-r--r--src/components/mention_link/mention_link.js20
-rw-r--r--src/components/mention_link/mention_link.scss5
-rw-r--r--src/components/mention_link/mention_link.vue2
3 files changed, 24 insertions, 3 deletions
diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js
index d26ae337..465c7d00 100644
--- a/src/components/mention_link/mention_link.js
+++ b/src/components/mention_link/mention_link.js
@@ -14,8 +14,14 @@ const MentionLink = {
type: String
},
origattrs: {
- required: true,
- type: Object
+ required: false,
+ type: Object,
+ default: {}
+ },
+ firstMention: {
+ required: false,
+ type: Boolean,
+ default: false
}
},
methods: {
@@ -61,6 +67,16 @@ const MentionLink = {
return rest
}
},
+ classnames () {
+ return [
+ {
+ '-you': this.isYou,
+ '-highlighted': this.highlight,
+ '-firstMention': this.firstMention
+ },
+ this.highlightType
+ ]
+ },
...mapGetters(['mergedConfig']),
...mapState({
currentUser: state => state.users.currentUser
diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss
index 78a9816c..dec11014 100644
--- a/src/components/mention_link/mention_link.scss
+++ b/src/components/mention_link/mention_link.scss
@@ -39,10 +39,15 @@
}
.new {
+ &.-firstMention {
+ display: none;
+ }
+
&,
&.-highlighted {
.short {
line-height: 1.5;
+ font-size: inherit;
&::before {
display: inline-block;
diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue
index d8d45a1b..05f6fd91 100644
--- a/src/components/mention_link/mention_link.vue
+++ b/src/components/mention_link/mention_link.vue
@@ -12,7 +12,7 @@
v-if="user"
class="new"
:style="style"
- :class="[{ '-you': isYou, '-highlighted': highlight }, highlightType]"
+ :class="classnames"
>
<button
class="short button-default"