diff --git a/src/App.scss b/src/App.scss index 45071ba2a..bc027f4fc 100644 --- a/src/App.scss +++ b/src/App.scss @@ -88,6 +88,10 @@ a { font-family: sans-serif; font-family: var(--interfaceFont, sans-serif); + &.-sublime { + background: transparent; + } + i[class*=icon-], .svg-inline--fa { color: $fallback--text; diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index d26ae3373..8ad84a51b 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -13,9 +13,10 @@ const MentionLink = { required: true, type: String }, - origattrs: { - required: true, - type: Object + firstMention: { + required: false, + type: Boolean, + default: false } }, methods: { @@ -50,6 +51,12 @@ const MentionLink = { highlightClass () { if (this.highlight) return highlightClass(this.user) }, + oldPlace () { + return !this.mergedConfig.mentionsOwnLine + }, + oldStyle () { + return !this.mergedConfig.mentionsNewStyle + }, style () { if (this.highlight) { const { @@ -61,6 +68,17 @@ const MentionLink = { return rest } }, + classnames () { + return [ + { + '-you': this.isYou, + '-highlighted': this.highlight, + '-firstMention': this.firstMention, + '-oldStyle': this.oldStyle + }, + 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 4a9fab1ca..eed4d5bef 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -11,7 +11,7 @@ } .original { - opacity: 0.5; + margin-right: 0.25em; } .full { @@ -33,23 +33,31 @@ & .short, & .full { &::before { - color: var(--faint); content: '@'; } } - .new:not(.-highlighted) { - .short { - background: none; - } - } .new { - &, - &.-highlighted { + margin-right: 0.25em; + + &.-firstMention { + display: none; + } + + &.-you { + & .shortName, + & .full { + font-weight: 600; + } + } + + &:not(.-oldStyle) { .short { line-height: 1.5; + font-size: inherit; &::before { + color: var(--faint); display: inline-block; height: 50%; line-height: 1; @@ -111,15 +119,6 @@ } } - .new { - &.-you { - & .shortName, - & .full { - font-weight: 600; - } - } - } - &: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 a38faa7b5..55f495074 100644 --- a/src/components/mention_link/mention_link.vue +++ b/src/components/mention_link/mention_link.vue @@ -1,5 +1,8 @@