From c5befd7c1adb8ac552f0b0e223b28184b2572fa1 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 989bc41444..ecdac62568 100644 --- a/app/javascript/flavours/glitch/actions/notifications.js +++ b/app/javascript/flavours/glitch/actions/notifications.js @@ -139,6 +139,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 ee3cbb9134..f70fa4c905 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -743,6 +743,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 8c4343b040..555115a0c4 100644 --- a/app/javascript/flavours/glitch/components/status_prepend.jsx +++ b/app/javascript/flavours/glitch/components/status_prepend.jsx @@ -56,6 +56,14 @@ export default class StatusPrepend extends React.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 7f36fb8135..08f2e2a3b5 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/filter_bar.jsx @@ -6,6 +6,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' }, @@ -73,6 +74,13 @@ class FilterBar extends React.PureComponent { > +