diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-02-20 15:11:52 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-02-20 15:11:52 +0000 |
| commit | 58d0f9678b749d1b2ef8aa7d6fb4a91da9cf947d (patch) | |
| tree | 6879bff1875d70c4eec0bf893e492e76ac0ff562 /src/components/mention_link | |
| parent | ddee8bb686fb18baf5212089653a8b4e40feedd6 (diff) | |
| parent | 86e3aefdab3fa1314d4731eabcf03f8c9e418e41 (diff) | |
Merge branch 'fix-mentions-new-bugs' into 'develop'
Fix newfound bugs with rich mentions + user suggestions
See merge request pleroma/pleroma-fe!1430
Diffstat (limited to 'src/components/mention_link')
| -rw-r--r-- | src/components/mention_link/mention_link.js | 8 | ||||
| -rw-r--r-- | src/components/mention_link/mention_link.scss | 13 | ||||
| -rw-r--r-- | src/components/mention_link/mention_link.vue | 16 |
3 files changed, 22 insertions, 15 deletions
diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index 5209907d..55eea195 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -87,7 +87,7 @@ const MentionLink = { classnames () { return [ { - '-you': this.isYou, + '-you': this.isYou && this.shouldBoldenYou, '-highlighted': this.highlight }, this.highlightType @@ -115,6 +115,12 @@ const MentionLink = { shouldShowAvatar () { return this.mergedConfig.mentionLinkShowAvatar }, + shouldShowYous () { + return this.mergedConfig.mentionLinkShowYous + }, + shouldBoldenYou () { + return this.mergedConfig.mentionLinkBoldenYou + }, shouldFadeDomain () { return this.mergedConfig.mentionLinkFadeDomain }, diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss index 03306dcc..a4326296 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -3,12 +3,13 @@ .MentionLink { position: relative; white-space: normal; - display: inline-block; + display: inline; color: var(--link); + word-break: normal; & .new, & .original { - display: inline-block; + display: inline; border-radius: 2px; } @@ -38,8 +39,8 @@ user-select: all; } - .short.-with-tooltip, - .you { + & .short.-with-tooltip, + & .you { user-select: none; } @@ -48,6 +49,10 @@ white-space: nowrap; } + .shortName { + white-space: normal; + } + .new { &.-you { & .shortName, diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue index ac20eb5a..3562f511 100644 --- a/src/components/mention_link/mention_link.vue +++ b/src/components/mention_link/mention_link.vue @@ -9,9 +9,7 @@ class="original" target="_blank" v-html="content" - /> - <!-- eslint-enable vue/no-v-html --> - <span + /><!-- eslint-enable vue/no-v-html --><span v-if="user" class="new" :style="style" @@ -43,14 +41,12 @@ class="serverName" :class="{ '-faded': shouldFadeDomain }" v-html="'@' + serverName" - /></span> - <span - v-if="isYou" - class="you" - >{{ $t('status.you') }}</span> + /></span><span + v-if="isYou && shouldShowYous" + :class="{ '-you': shouldBoldenYou }" + > {{ $t('status.you') }}</span> <!-- eslint-enable vue/no-v-html --> - </a> - <span + </a><span v-if="shouldShowTooltip" class="full popover-default" :class="[highlightType]" |
