diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index acd0f584e..eec116db9 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -1,11 +1,20 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import { mapGetters, mapState } from 'vuex' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' +import { library } from '@fortawesome/fontawesome-svg-core' +import { + faAt +} from '@fortawesome/free-solid-svg-icons' + +library.add( + faAt +) const MentionLink = { name: 'MentionLink', props: { url: { + required: true, type: String }, content: { @@ -19,11 +28,6 @@ const MentionLink = { userScreenName: { required: false, type: String - }, - firstMention: { - required: false, - type: Boolean, - default: false } }, methods: { @@ -61,9 +65,6 @@ const MentionLink = { highlightClass () { if (this.highlight) return highlightClass(this.user) }, - oldPlace () { - return !this.mergedConfig.mentionsOwnLine - }, oldStyle () { return !this.mergedConfig.mentionsNewStyle }, @@ -83,7 +84,6 @@ const MentionLink = { { '-you': this.isYou, '-highlighted': this.highlight, - '-firstMention': this.firstMention, '-oldStyle': this.oldStyle }, this.highlightType diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss index eed4d5bef..5f5da98f4 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -28,22 +28,21 @@ z-index: 1; margin-top: 0.25em; padding: 0.5em; + user-select: all; + } + + .short { + user-select: none; } & .short, & .full { - &::before { - content: '@'; - } + white-space: nowrap; } .new { margin-right: 0.25em; - &.-firstMention { - display: none; - } - &.-you { & .shortName, & .full { @@ -51,17 +50,31 @@ } } + .at { + color: var(--link); + opacity: 0.8; + display: inline-block; + height: 50%; + line-height: 1; + padding: 0 0.1em; + vertical-align: -25%; + margin: 0; + } + &:not(.-oldStyle) { .short { + padding-left: 0.25em; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; line-height: 1.5; font-size: inherit; - &::before { + .at { color: var(--faint); - display: inline-block; - height: 50%; - line-height: 1; - vertical-align: 6%; + opacity: 0.8; + padding-right: 0.25em; + vertical-align: -20%; } } @@ -69,18 +82,11 @@ padding-right: 0.25em; } - .short { - padding-left: 0.25em; - padding-right: 0; - padding-top: 0; - padding-bottom: 0; - } - .userName { display: inline-block; color: var(--link); line-height: inherit; - margin-left: 0.125em; + margin-left: 0; padding-left: 0.125em; padding-right: 0.25em; padding-top: 0; diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue index 55f495074..3449f4bd6 100644 --- a/src/components/mention_link/mention_link.vue +++ b/src/components/mention_link/mention_link.vue @@ -1,7 +1,6 @@