From d9c21293aa6e105cedeff6b5e469af40a20909d9 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 14 Aug 2023 19:02:47 +0200 Subject: [PATCH 1/2] Fix unfollow icon styling in advanced column (#26482) --- .../mastodon/features/account/components/header.jsx | 4 ++-- app/javascript/styles/mastodon/components.scss | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index d351e210f6..fe6cbad547 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -265,9 +265,9 @@ class Header extends ImmutablePureComponent { if (signedIn && !account.get('relationship')) { // Wait until the relationship is loaded actionBtn = ''; } else if (account.getIn(['relationship', 'requested'])) { - actionBtn = } + + ); +}; + +HashtagBar.propTypes = { + hashtags: ImmutablePropTypes.list, + text: PropTypes.string, +}; \ No newline at end of file diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 37951d5782..7c34684d71 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -22,6 +22,7 @@ import { displayMedia } from '../initial_state'; import { Avatar } from './avatar'; import { AvatarOverlay } from './avatar_overlay'; import { DisplayName } from './display_name'; +import { HashtagBar } from './hashtag_bar'; import { RelativeTimestamp } from './relative_timestamp'; import StatusActionBar from './status_action_bar'; import StatusContent from './status_content'; @@ -580,6 +581,8 @@ class Status extends ImmutablePureComponent { {media} + + diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index 7348905c53..c1815b9167 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -10,6 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { AnimatedNumber } from 'mastodon/components/animated_number'; import EditedTimestamp from 'mastodon/components/edited_timestamp'; +import { HashtagBar } from 'mastodon/components/hashtag_bar'; import { Icon } from 'mastodon/components/icon'; import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder'; @@ -314,6 +315,8 @@ class DetailedStatus extends ImmutablePureComponent { {media} + +
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 5b7b4f6b35..7205bff055 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -300,6 +300,7 @@ "hashtag.counter_by_uses_today": "{count, plural, one {{counter} post} other {{counter} posts}} today", "hashtag.follow": "Follow hashtag", "hashtag.unfollow": "Unfollow hashtag", + "hashtags.and_other": "…and {count, plural, other {# more}}", "home.actions.go_to_explore": "See what's trending", "home.actions.go_to_suggestions": "Find people to follow", "home.column_settings.basic": "Basic", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 46c7d328ca..009d4f71d6 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -9256,3 +9256,26 @@ noscript { } } } + +.hashtag-bar { + margin-top: 16px; + display: flex; + flex-wrap: wrap; + font-size: 14px; + gap: 4px; + + a { + display: inline-flex; + border-radius: 4px; + background: rgba($highlight-text-color, 0.2); + color: $highlight-text-color; + padding: 0.4em 0.6em; + text-decoration: none; + + &:hover, + &:focus, + &:active { + background: rgba($highlight-text-color, 0.3); + } + } +}