From 06042569f1d2f2c7217917459df007adbb113e53 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 3 Feb 2022 22:10:45 +0200 Subject: fix alignment issues --- src/components/mention_link/mention_link.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/mention_link') diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss index 03306dcc..23d18f59 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -3,7 +3,7 @@ .MentionLink { position: relative; white-space: normal; - display: inline-block; + display: inline-flex; color: var(--link); & .new, -- cgit v1.2.3-70-g09d2 From bfb3a4364be3f71f7c46056aeb8972f04a072703 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 3 Feb 2022 22:34:57 +0200 Subject: options to disable (You)s and highlighting of yourself --- src/components/mention_link/mention_link.js | 8 +++++++- src/components/mention_link/mention_link.vue | 4 ++-- src/components/settings_modal/tabs/general_tab.vue | 10 ++++++++++ src/i18n/en.json | 2 ++ src/modules/config.js | 2 ++ src/modules/instance.js | 2 ++ 6 files changed, 25 insertions(+), 3 deletions(-) (limited to 'src/components/mention_link') 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.vue b/src/components/mention_link/mention_link.vue index ac20eb5a..d8ab79fb 100644 --- a/src/components/mention_link/mention_link.vue +++ b/src/components/mention_link/mention_link.vue @@ -45,8 +45,8 @@ v-html="'@' + serverName" /> {{ $t('status.you') }} diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 44b1ac92..eba3b268 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -147,6 +147,11 @@ {{ $t('settings.greentext') }} +
  • + + {{ $t('settings.show_yous') }} + +
  • +
  • + + {{ $t('settings.mention_link_bolden_you') }} + +
  • diff --git a/src/i18n/en.json b/src/i18n/en.json index 209fd184..8fd189c6 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -493,8 +493,10 @@ "mention_link_show_tooltip": "Show full user names as tooltip for remote users", "mention_link_show_avatar": "Show user avatar beside the link", "mention_link_fade_domain": "Fade domains (e.g. @example.org in @foo@example.org)", + "mention_link_bolden_you": "Bolden text of your mention", "fun": "Fun", "greentext": "Meme arrows", + "show_yous": "Show (You)s", "notifications": "Notifications", "notification_setting_filters": "Filters", "notification_setting_block_from_strangers": "Block notifications from users who you do not follow", diff --git a/src/modules/config.js b/src/modules/config.js index 9f2d4ef3..20979174 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -76,6 +76,8 @@ export const defaultState = { mentionLinkShowTooltip: undefined, // instance default mentionLinkShowAvatar: undefined, // instance default mentionLinkFadeDomain: undefined, // instance default + mentionLinkShowYous: undefined, // instance default + mentionLinkBoldenYou: undefined, // instance default hidePostStats: undefined, // instance default hideUserStats: undefined, // instance default virtualScrolling: undefined, // instance default diff --git a/src/modules/instance.js b/src/modules/instance.js index d686f258..1abd784f 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -25,6 +25,8 @@ const defaultState = { mentionLinkShowTooltip: true, mentionLinkShowAvatar: false, mentionLinkFadeDomain: true, + mentionLinkShowYous: false, + mentionLinkBoldenYou: true, hideFilteredStatuses: false, // bad name: actually hides posts of muted USERS hideMutedPosts: false, -- cgit v1.2.3-70-g09d2 From d361a4d7dc18bd7c722ed76a894ebee8e5a50ed5 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 4 Feb 2022 14:20:56 +0200 Subject: fix overflows --- src/components/mention_link/mention_link.scss | 12 ++++++++---- src/components/mentions_line/mentions_line.scss | 7 ++----- src/components/status/status.scss | 2 ++ src/components/status_body/status_body.scss | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) (limited to 'src/components/mention_link') diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss index 23d18f59..c7db7fb9 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -3,12 +3,12 @@ .MentionLink { position: relative; white-space: normal; - display: inline-flex; + display: inline; color: var(--link); & .new, & .original { - display: inline-block; + display: inline; border-radius: 2px; } @@ -38,8 +38,8 @@ user-select: all; } - .short.-with-tooltip, - .you { + & .short.-with-tooltip, + & .you { user-select: none; } @@ -48,6 +48,10 @@ white-space: nowrap; } + .shortName { + white-space: normal; + } + .new { &.-you { & .shortName, diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss index b9d5c14a..1a485860 100644 --- a/src/components/mentions_line/mentions_line.scss +++ b/src/components/mentions_line/mentions_line.scss @@ -1,11 +1,8 @@ .MentionsLine { + word-break: break-all; + .showMoreLess { white-space: normal; color: var(--link); } - - .fullExtraMentions, - .mention-link:not(:last-child) { - margin-right: 0.25em; - } } diff --git a/src/components/status/status.scss b/src/components/status/status.scss index 0f527def..2028ade9 100644 --- a/src/components/status/status.scss +++ b/src/components/status/status.scss @@ -5,6 +5,8 @@ $status-margin: 0.75em; .Status { min-width: 0; white-space: normal; + word-wrap: break-word; + word-break: break-word; &:hover { --_still-image-img-visibility: visible; diff --git a/src/components/status_body/status_body.scss b/src/components/status_body/status_body.scss index c7732bfe..51623a26 100644 --- a/src/components/status_body/status_body.scss +++ b/src/components/status_body/status_body.scss @@ -9,7 +9,7 @@ & .text, & .summary { font-family: var(--postFont, sans-serif); - white-space: pre-wrap; + white-space: normal; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; -- cgit v1.2.3-70-g09d2 From 4c7edfc9a9865003483bc4b78d29bb554e7901ad Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 9 Feb 2022 23:34:06 +0200 Subject: more spacing/wrapping fixes --- src/components/mention_link/mention_link.scss | 1 + src/components/mention_link/mention_link.vue | 8 +++----- src/components/mentions_line/mentions_line.scss | 1 + src/components/status_body/status_body.scss | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/components/mention_link') diff --git a/src/components/mention_link/mention_link.scss b/src/components/mention_link/mention_link.scss index c7db7fb9..a4326296 100644 --- a/src/components/mention_link/mention_link.scss +++ b/src/components/mention_link/mention_link.scss @@ -5,6 +5,7 @@ white-space: normal; display: inline; color: var(--link); + word-break: normal; & .new, & .original { diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue index d8ab79fb..13786c3a 100644 --- a/src/components/mention_link/mention_link.vue +++ b/src/components/mention_link/mention_link.vue @@ -43,14 +43,12 @@ class="serverName" :class="{ '-faded': shouldFadeDomain }" v-html="'@' + serverName" - /> - {{ $t('status.you') }} + > {{ $t('status.you') }} - - Date: Fri, 11 Feb 2022 15:06:12 +0200 Subject: more spacing fixes --- src/components/mention_link/mention_link.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/components/mention_link') diff --git a/src/components/mention_link/mention_link.vue b/src/components/mention_link/mention_link.vue index 13786c3a..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" - /> - -