diff --git a/app/javascript/mastodon/components/status_action_bar.jsx b/app/javascript/mastodon/components/status_action_bar.jsx index 240174739..ce44162c5 100644 --- a/app/javascript/mastodon/components/status_action_bar.jsx +++ b/app/javascript/mastodon/components/status_action_bar.jsx @@ -2,7 +2,6 @@ import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; -import classNames from 'classnames'; import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; @@ -11,12 +10,12 @@ import { connect } from 'react-redux'; import { ReactComponent as BookmarkIcon } from '@material-symbols/svg-600/outlined/bookmark-fill.svg'; import { ReactComponent as BookmarkBorderIcon } from '@material-symbols/svg-600/outlined/bookmark.svg'; +import { ReactComponent as FavoriteActiveIcon } from '@material-symbols/svg-600/outlined/favorite-fill.svg'; +import { ReactComponent as FavoriteIcon } from '@material-symbols/svg-600/outlined/favorite.svg'; import { ReactComponent as MoreHorizIcon } from '@material-symbols/svg-600/outlined/more_horiz.svg'; import { ReactComponent as RepeatIcon } from '@material-symbols/svg-600/outlined/repeat.svg'; import { ReactComponent as ReplyIcon } from '@material-symbols/svg-600/outlined/reply.svg'; import { ReactComponent as ReplyAllIcon } from '@material-symbols/svg-600/outlined/reply_all.svg'; -import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; -import { ReactComponent as StarBorderIcon } from '@material-symbols/svg-600/outlined/star.svg'; import { ReactComponent as VisibilityIcon } from '@material-symbols/svg-600/outlined/visibility.svg'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; @@ -44,6 +43,7 @@ const messages = defineMessages({ cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' }, cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, favourite: { id: 'status.favourite', defaultMessage: 'Favorite' }, + removeFavourite: { id: 'status.unfavourite', defaultMessage: 'Remove like' }, bookmark: { id: 'status.bookmark', defaultMessage: 'Bookmark' }, removeBookmark: { id: 'status.remove_bookmark', defaultMessage: 'Remove bookmark' }, open: { id: 'status.open', defaultMessage: 'Expand this status' }, @@ -275,11 +275,8 @@ class StatusActionBar extends ImmutablePureComponent { } if (signedIn) { - menu.push(null); - - menu.push({ text: intl.formatMessage(status.get('bookmarked') ? messages.removeBookmark : messages.bookmark), action: this.handleBookmarkClick }); - if (writtenByMe && pinnableStatus) { + menu.push(null); menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick }); } @@ -380,9 +377,9 @@ class StatusActionBar extends ImmutablePureComponent { return (
- - - + + + {filterButton} diff --git a/app/javascript/mastodon/features/favourited_statuses/index.jsx b/app/javascript/mastodon/features/favourited_statuses/index.jsx index d3c3cc9f0..36d8f6108 100644 --- a/app/javascript/mastodon/features/favourited_statuses/index.jsx +++ b/app/javascript/mastodon/features/favourited_statuses/index.jsx @@ -8,7 +8,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; -import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; +import { ReactComponent as FavoriteIcon } from '@material-symbols/svg-600/outlined/favorite-fill.svg'; import { debounce } from 'lodash'; import { addColumn, removeColumn, moveColumn } from 'mastodon/actions/columns'; @@ -81,7 +81,7 @@ class Favourites extends ImmutablePureComponent {
- + diff --git a/app/javascript/mastodon/features/status/components/action_bar.jsx b/app/javascript/mastodon/features/status/components/action_bar.jsx index eac0bab7e..a72432d9b 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.jsx +++ b/app/javascript/mastodon/features/status/components/action_bar.jsx @@ -3,7 +3,6 @@ import { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; -import classNames from 'classnames'; import { withRouter } from 'react-router-dom'; import ImmutablePropTypes from 'react-immutable-proptypes'; @@ -11,12 +10,12 @@ import { connect } from 'react-redux'; import { ReactComponent as BookmarkIcon } from '@material-symbols/svg-600/outlined/bookmark-fill.svg'; import { ReactComponent as BookmarkBorderIcon } from '@material-symbols/svg-600/outlined/bookmark.svg'; +import { ReactComponent as FavoriteActiveIcon } from '@material-symbols/svg-600/outlined/favorite-fill.svg'; +import { ReactComponent as FavoriteIcon } from '@material-symbols/svg-600/outlined/favorite.svg'; import { ReactComponent as MoreHorizIcon } from '@material-symbols/svg-600/outlined/more_horiz.svg'; import { ReactComponent as RepeatIcon } from '@material-symbols/svg-600/outlined/repeat.svg'; import { ReactComponent as ReplyIcon } from '@material-symbols/svg-600/outlined/reply.svg'; import { ReactComponent as ReplyAllIcon } from '@material-symbols/svg-600/outlined/reply_all.svg'; -import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; -import { ReactComponent as StarBorderIcon } from '@material-symbols/svg-600/outlined/star.svg'; import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -36,8 +35,10 @@ const messages = defineMessages({ reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost with original visibility' }, cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' }, cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, - favourite: { id: 'status.favourite', defaultMessage: 'Favorite' }, + favourite: { id: 'status.like', defaultMessage: 'Like' }, + removeFavourite: { id: 'status.remove_like', defaultMessage: 'Remove like' }, bookmark: { id: 'status.bookmark', defaultMessage: 'Bookmark' }, + removeBookmark: { id: 'status.remove_bookmark', defaultMessage: 'Remove bookmark' }, more: { id: 'status.more', defaultMessage: 'More' }, mute: { id: 'status.mute', defaultMessage: 'Mute @{name}' }, muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' }, @@ -304,9 +305,9 @@ class ActionBar extends PureComponent { return (
-
-
-
+
+
+
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index d8d955912..c1dd95492 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -9,8 +9,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { ReactComponent as AlternateEmailIcon } from '@material-symbols/svg-600/outlined/alternate_email.svg'; +import { ReactComponent as FavoriteIcon } from '@material-symbols/svg-600/outlined/favorite-fill.svg'; import { ReactComponent as RepeatIcon } from '@material-symbols/svg-600/outlined/repeat.svg'; -import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; import { AnimatedNumber } from 'mastodon/components/animated_number'; import EditedTimestamp from 'mastodon/components/edited_timestamp'; @@ -255,7 +255,7 @@ class DetailedStatus extends ImmutablePureComponent { if (this.props.history) { favouriteLink = ( - + @@ -264,7 +264,7 @@ class DetailedStatus extends ImmutablePureComponent { } else { favouriteLink = ( - + diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx index 4b0e03a0f..706ae59fd 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.jsx +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.jsx @@ -7,13 +7,13 @@ import { Link } from 'react-router-dom'; import { ReactComponent as AlternateEmailIcon } from '@material-symbols/svg-600/outlined/alternate_email.svg'; import { ReactComponent as BookmarksIcon } from '@material-symbols/svg-600/outlined/bookmarks-fill.svg'; +import { ReactComponent as FavoriteIcon } from '@material-symbols/svg-600/outlined/favorite-fill.svg'; import { ReactComponent as HomeIcon } from '@material-symbols/svg-600/outlined/home-fill.svg'; import { ReactComponent as ListAltIcon } from '@material-symbols/svg-600/outlined/list_alt.svg'; import { ReactComponent as MoreHorizIcon } from '@material-symbols/svg-600/outlined/more_horiz.svg'; import { ReactComponent as PublicIcon } from '@material-symbols/svg-600/outlined/public.svg'; import { ReactComponent as SearchIcon } from '@material-symbols/svg-600/outlined/search.svg'; import { ReactComponent as SettingsIcon } from '@material-symbols/svg-600/outlined/settings-fill.svg'; -import { ReactComponent as StarIcon } from '@material-symbols/svg-600/outlined/star-fill.svg'; import { ReactComponent as TagIcon } from '@material-symbols/svg-600/outlined/tag.svg'; import { WordmarkLogo } from 'mastodon/components/logo'; @@ -115,8 +115,8 @@ class NavigationPanel extends Component { {signedIn && ( <> + - diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 4399b9995..f035a4141 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -113,7 +113,7 @@ "column.direct": "Private mentions", "column.directory": "Browse profiles", "column.domain_blocks": "Blocked domains", - "column.favourites": "Favorites", + "column.favourites": "Liked posts", "column.firehose": "Live feeds", "column.follow_requests": "Follow requests", "column.home": "Home", @@ -231,8 +231,8 @@ "empty_column.direct": "You don't have any private mentions yet. When you send or receive one, it will show up here.", "empty_column.domain_blocks": "There are no blocked domains yet.", "empty_column.explore_statuses": "Nothing is trending right now. Check back later!", - "empty_column.favourited_statuses": "You don't have any favorite posts yet. When you favorite one, it will show up here.", - "empty_column.favourites": "No one has favorited this post yet. When someone does, they will show up here.", + "empty_column.favourited_statuses": "You haven't liked any posts yet. When you like one, it will show up here.", + "empty_column.favourites": "No one has liked this post yet. When someone does, they will show up here.", "empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.", "empty_column.followed_tags": "You have not followed any hashtags yet. When you do, they will show up here.", "empty_column.hashtag": "There is nothing in this hashtag yet.", @@ -314,7 +314,7 @@ "home.pending_critical_update.link": "See updates", "home.pending_critical_update.title": "Critical security update available!", "home.show_announcements": "Show announcements", - "interaction_modal.description.favourite": "With an account on Mastodon, you can favorite this post to let the author know you appreciate it and save it for later.", + "interaction_modal.description.favourite": "With an account on Mastodon, you can like this post to let the author know you appreciate it and save it for later.", "interaction_modal.description.follow": "With an account on Mastodon, you can follow {name} to receive their posts in your home feed.", "interaction_modal.description.reblog": "With an account on Mastodon, you can boost this post to share it with your own followers.", "interaction_modal.description.reply": "With an account on Mastodon, you can respond to this post.", @@ -325,7 +325,7 @@ "interaction_modal.on_this_server": "On this server", "interaction_modal.sign_in": "You are not logged in to this server. Where is your account hosted?", "interaction_modal.sign_in_hint": "Tip: That's the website where you signed up. If you don't remember, look for the welcome e-mail in your inbox. You can also enter your full username! (e.g. @Mastodon@mastodon.social)", - "interaction_modal.title.favourite": "Favorite {name}'s post", + "interaction_modal.title.favourite": "Like {name}'s post", "interaction_modal.title.follow": "Follow {name}", "interaction_modal.title.reblog": "Boost {name}'s post", "interaction_modal.title.reply": "Reply to {name}'s post", @@ -341,8 +341,8 @@ "keyboard_shortcuts.direct": "to open private mentions column", "keyboard_shortcuts.down": "Move down in the list", "keyboard_shortcuts.enter": "Open post", - "keyboard_shortcuts.favourite": "Favorite post", - "keyboard_shortcuts.favourites": "Open favorites list", + "keyboard_shortcuts.favourite": "Like post", + "keyboard_shortcuts.favourites": "Open liked posts", "keyboard_shortcuts.federated": "Open federated timeline", "keyboard_shortcuts.heading": "Keyboard shortcuts", "keyboard_shortcuts.home": "Open home timeline", @@ -406,7 +406,7 @@ "navigation_bar.domain_blocks": "Blocked domains", "navigation_bar.edit_profile": "Edit profile", "navigation_bar.explore": "Explore", - "navigation_bar.favourites": "Favorites", + "navigation_bar.favourites": "Liked posts", "navigation_bar.filters": "Muted words", "navigation_bar.follow_requests": "Follow requests", "navigation_bar.followed_tags": "Followed hashtags", @@ -424,7 +424,7 @@ "not_signed_in_indicator.not_signed_in": "You need to login to access this resource.", "notification.admin.report": "{name} reported {target}", "notification.admin.sign_up": "{name} signed up", - "notification.favourite": "{name} favorited your post", + "notification.favourite": "{name} liked your post", "notification.follow": "{name} followed you", "notification.follow_request": "{name} has requested to follow you", "notification.mention": "{name} mentioned you", @@ -438,7 +438,7 @@ "notifications.column_settings.admin.report": "New reports:", "notifications.column_settings.admin.sign_up": "New sign-ups:", "notifications.column_settings.alert": "Desktop notifications", - "notifications.column_settings.favourite": "Favorites:", + "notifications.column_settings.favourite": "Likes:", "notifications.column_settings.filter_bar.advanced": "Display all categories", "notifications.column_settings.filter_bar.category": "Quick filter bar", "notifications.column_settings.filter_bar.show_bar": "Show filter bar", @@ -456,7 +456,7 @@ "notifications.column_settings.update": "Edits:", "notifications.filter.all": "All", "notifications.filter.boosts": "Boosts", - "notifications.filter.favourites": "Favorites", + "notifications.filter.favourites": "Likes", "notifications.filter.follows": "Follows", "notifications.filter.mentions": "Mentions", "notifications.filter.polls": "Poll results", @@ -630,12 +630,13 @@ "status.edited": "Edited {date}", "status.edited_x_times": "Edited {count, plural, one {{count} time} other {{count} times}}", "status.embed": "Embed", - "status.favourite": "Favorite", + "status.favourite": "Like", "status.filter": "Filter this post", "status.filtered": "Filtered", "status.hide": "Hide post", "status.history.created": "{name} created {date}", "status.history.edited": "{name} edited {date}", + "status.like": "Like", "status.load_more": "Load more", "status.media.open": "Click to open", "status.media.show": "Click to show", @@ -654,6 +655,7 @@ "status.reblogs.empty": "No one has boosted this post yet. When someone does, they will show up here.", "status.redraft": "Delete & re-draft", "status.remove_bookmark": "Remove bookmark", + "status.remove_like": "Remove like", "status.replied_to": "Replied to {name}", "status.reply": "Reply", "status.replyAll": "Reply to thread", @@ -670,6 +672,7 @@ "status.translate": "Translate", "status.translated_from_with": "Translated from {lang} using {provider}", "status.uncached_media_warning": "Preview not available", + "status.unfavourite": "Remove like", "status.unmute_conversation": "Unmute conversation", "status.unpin": "Unpin from profile", "subscribed_languages.lead": "Only posts in selected languages will appear on your home and list timelines after the change. Select none to receive posts in all languages.", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 1e341680e..65d0d306e 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1796,7 +1796,7 @@ a.account__display-name { } .icon-star { - color: $gold-star; + color: $red-bookmark; } > span { @@ -1807,27 +1807,9 @@ a.account__display-name { } .icon-button.star-icon.active { - color: $gold-star; -} - -.icon-button.bookmark-icon.active { color: $red-bookmark; } -.no-reduce-motion .icon-button.star-icon { - &.activate { - & > .icon { - animation: spring-rotate-in 1s linear; - } - } - - &.deactivate { - & > .icon { - animation: spring-rotate-out 1s linear; - } - } -} - .notification__display-name { color: inherit; font-weight: 500; @@ -4103,50 +4085,6 @@ a.status-card { } } -@keyframes spring-rotate-in { - 0% { - transform: rotate(0deg); - } - - 30% { - transform: rotate(-484.8deg); - } - - 60% { - transform: rotate(-316.7deg); - } - - 90% { - transform: rotate(-375deg); - } - - 100% { - transform: rotate(-360deg); - } -} - -@keyframes spring-rotate-out { - 0% { - transform: rotate(-360deg); - } - - 30% { - transform: rotate(124.8deg); - } - - 60% { - transform: rotate(-43.27deg); - } - - 90% { - transform: rotate(15deg); - } - - 100% { - transform: rotate(0deg); - } -} - .video-error-cover { align-items: center; background: $base-overlay-background; @@ -5362,16 +5300,16 @@ a.status-card { } &.star-icon.active { - color: $gold-star; + color: $red-bookmark; &:hover, &:focus, &:active { - background: rgba($gold-star, 0.15); + background: rgba($red-bookmark, 0.15); } &:focus { - background: rgba($gold-star, 0.3); + background: rgba($red-bookmark, 0.3); } } @@ -7624,7 +7562,7 @@ noscript { .account__details { display: flex; flex-wrap: wrap; - column-gap: 1em; + gap: 8px; } .verified-badge { diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml index 0432a5e3f..13bc27923 100644 --- a/config/locales/doorkeeper.en.yml +++ b/config/locales/doorkeeper.en.yml @@ -127,7 +127,7 @@ en: bookmarks: Bookmarks conversations: Conversations crypto: End-to-end encryption - favourites: Favorites + favourites: Likes filters: Filters follow: Follows, Mutes and Blocks follows: Follows @@ -170,7 +170,7 @@ en: read:accounts: see accounts information read:blocks: see your blocks read:bookmarks: see your bookmarks - read:favourites: see your favorites + read:favourites: see your liked posts read:filters: see your filters read:follows: see your follows read:lists: see your lists @@ -184,7 +184,7 @@ en: write:blocks: block accounts and domains write:bookmarks: bookmark posts write:conversations: mute and delete conversations - write:favourites: favorite posts + write:favourites: like posts write:filters: create filters write:follows: follow people write:lists: create lists diff --git a/config/locales/en.yml b/config/locales/en.yml index c298c47d3..7769b995e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -802,7 +802,7 @@ en: remove_from_report: Remove from report report: Report deleted: Deleted - favourites: Favorites + favourites: Likes history: Version history in_reply_to: Replying to language: Language @@ -903,14 +903,14 @@ en: statuses: allow: Allow post allow_account: Allow author - description_html: These are posts that your server knows about that are currently being shared and favorited a lot at the moment. It can help your new and returning users to find more people to follow. No posts are displayed publicly until you approve the author, and the author allows their account to be suggested to others. You can also allow or reject individual posts. + description_html: These are posts that your server knows about that are currently being shared and liked a lot at the moment. It can help your new and returning users to find more people to follow. No posts are displayed publicly until you approve the author, and the author allows their account to be suggested to others. You can also allow or reject individual posts. disallow: Disallow post disallow_account: Disallow author no_status_selected: No trending posts were changed as none were selected not_discoverable: Author has not opted-in to being discoverable shared_by: - one: Shared or favorited one time - other: Shared and favorited %{friendly_count} times + one: Shared or liked one time + other: Shared and liked %{friendly_count} times title: Trending posts tags: current_score: Current score %{score} @@ -1399,7 +1399,7 @@ en: confirmation_html: Are you sure you want to unsubscribe from receiving %{type} for Mastodon on %{domain} to your e-mail at %{email}? You can always re-subscribe from your e-mail notification settings. emails: notification_emails: - favourite: favorite notification e-mails + favourite: like notification e-mails follow: follow notification e-mails follow_request: follow request e-mails mention: mention notification e-mails @@ -1458,9 +1458,9 @@ en: sign_up: subject: "%{name} signed up" favourite: - body: 'Your post was favorited by %{name}:' - subject: "%{name} favorited your post" - title: New favorite + body: 'Your post was liked by %{name}:' + subject: "%{name} liked your post" + title: New like follow: body: "%{name} is now following you!" subject: "%{name} is now following you" @@ -1706,10 +1706,10 @@ en: enabled_hint: Automatically deletes your posts once they reach a specified age threshold, unless they match one of the exceptions below exceptions: Exceptions explanation: Because deleting posts is an expensive operation, this is done slowly over time when the server is not otherwise busy. For this reason, your posts may be deleted a while after they reach the age threshold. - ignore_favs: Ignore favorites + ignore_favs: Ignore likes ignore_reblogs: Ignore boosts interaction_exceptions: Exceptions based on interactions - interaction_exceptions_explanation: Note that there is no guarantee for posts to be deleted if they go below the favorite or boost threshold after having once gone over them. + interaction_exceptions_explanation: Note that there is no guarantee for posts to be deleted if they go below the like or boost threshold after having once gone over them. keep_direct: Keep direct messages keep_direct_hint: Doesn't delete any of your direct messages keep_media: Keep posts with media attachments @@ -1720,8 +1720,8 @@ en: keep_polls_hint: Doesn't delete any of your polls keep_self_bookmark: Keep posts you bookmarked keep_self_bookmark_hint: Doesn't delete your own posts if you have bookmarked them - keep_self_fav: Keep posts you favorited - keep_self_fav_hint: Doesn't delete your own posts if you have favorited them + keep_self_fav: Keep posts you liked + keep_self_fav_hint: Doesn't delete your own posts if you have liked them min_age: '1209600': 2 weeks '15778476': 6 months @@ -1732,8 +1732,8 @@ en: '63113904': 2 years '7889238': 3 months min_age_label: Age threshold - min_favs: Keep posts favorited at least - min_favs_hint: Doesn't delete any of your posts that has received at least this number of favorites. Leave blank to delete posts regardless of their number of favorites + min_favs: Keep posts liked at least + min_favs_hint: Doesn't delete any of your posts that has received at least this number of likes. Leave blank to delete posts regardless of their number of likes min_reblogs: Keep posts boosted at least min_reblogs_hint: Doesn't delete any of your posts that has been boosted at least this number of times. Leave blank to delete posts regardless of their number of boosts stream_entries: diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb index 78a497c06..d3b16fec7 100644 --- a/spec/mailers/notification_mailer_spec.rb +++ b/spec/mailers/notification_mailer_spec.rb @@ -73,11 +73,11 @@ RSpec.describe NotificationMailer do include_examples 'headers', 'favourite', true it 'renders the subject' do - expect(mail.subject).to eq('bob favorited your post') + expect(mail.subject).to eq('bob liked your post') end it 'renders the body' do - expect(mail.body.encoded).to match('Your post was favorited by bob') + expect(mail.body.encoded).to match('Your post was liked by bob') expect(mail.body.encoded).to include 'The body of the own status' end end