From 4750a8005d9cf8ef6b31bdf0043f1b3f2f2422bb Mon Sep 17 00:00:00 2001 From: fef Date: Tue, 29 Nov 2022 04:31:22 +0100 Subject: [PATCH] cherry-pick emoji reaction changes --- .../flavours/glitch/actions/notifications.js | 1 + .../flavours/glitch/components/status.jsx | 1 + .../glitch/components/status_prepend.jsx | 11 ++++++++++ .../glitch/components/status_reactions_bar.js | 1 - .../components/column_settings.jsx | 11 ++++++++++ .../notifications/components/filter_bar.jsx | 8 +++++++ .../notifications/components/notification.jsx | 22 +++++++++++++++++++ .../flavours/glitch/locales/de.json | 3 +++ .../flavours/glitch/locales/en.json | 3 +++ .../flavours/glitch/locales/fr.json | 3 +++ .../flavours/glitch/reducers/settings.js | 3 +++ app/models/notification.rb | 12 +++++++++- .../rest/notification_serializer.rb | 2 +- app/services/status_reaction_service.rb | 1 + config/locales/de.yml | 4 ++++ config/locales/en.yml | 4 ++++ config/locales/fr.yml | 4 ++++ 17 files changed, 91 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js index a80746b75..f370905de 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -146,6 +146,7 @@ const excludeTypesFromFilter = filter => { 'follow', 'follow_request', 'favourite', + 'reaction', 'reblog', 'mention', 'poll', diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx index 5899e64b5..53b5922b3 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -755,6 +755,7 @@ class Status extends ImmutablePureComponent { if (this.props.prepend && account) { const notifKind = { favourite: 'favourited', + reaction: 'reacted', reblog: 'boosted', reblogged_by: 'boosted', status: 'posted', diff --git a/app/javascript/flavours/glitch/components/status_prepend.jsx b/app/javascript/flavours/glitch/components/status_prepend.jsx index 9b2bcc8ea..e5accfd9f 100644 --- a/app/javascript/flavours/glitch/components/status_prepend.jsx +++ b/app/javascript/flavours/glitch/components/status_prepend.jsx @@ -59,6 +59,14 @@ export default class StatusPrepend extends PureComponent { values={{ name : link }} /> ); + case 'reaction': + return ( + + ); case 'reblog': return ( +
+ + +
+ + {showPushSettings && } + + +
+
+
diff --git a/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx b/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx index 99ce16749..2936fafdb 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx @@ -8,6 +8,7 @@ import { Icon } from 'flavours/glitch/components/icon'; const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favourites' }, + reactions: { id: 'notifications.filter.reactions', defaultMessage: 'Reactions' }, boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' }, polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' }, follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' }, @@ -75,6 +76,13 @@ class FilterBar extends PureComponent { > +