From 65d9004ac90209a035e2f103e271986ff8650410 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 13 Mar 2019 19:29:54 +0100 Subject: [PATCH] Add UI for enabling/disabling poll notifications (#10255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add UI for enabling/disabling poll notifications * Add poll notifications to the (advanced) quick filter bar * Update poll notification message “Your poll has ended” → “A poll you have voted in has ended” * Clear up associated notifications when a poll is deleted --- .../notifications/components/column_settings.js | 11 +++++++++++ .../features/notifications/components/filter_bar.js | 8 ++++++++ .../features/notifications/components/notification.js | 4 ++-- app/javascript/mastodon/locales/en.json | 2 +- .../mastodon/reducers/push_notifications.js | 1 + app/models/poll.rb | 2 ++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.js b/app/javascript/mastodon/features/notifications/components/column_settings.js index a334fd63c..60a86312a 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.js +++ b/app/javascript/mastodon/features/notifications/components/column_settings.js @@ -89,6 +89,17 @@ export default class ColumnSettings extends React.PureComponent { + +
+ + +
+ + {showPushSettings && } + + +
+
); } diff --git a/app/javascript/mastodon/features/notifications/components/filter_bar.js b/app/javascript/mastodon/features/notifications/components/filter_bar.js index 6ae8b7491..3f3e6ab7d 100644 --- a/app/javascript/mastodon/features/notifications/components/filter_bar.js +++ b/app/javascript/mastodon/features/notifications/components/filter_bar.js @@ -7,6 +7,7 @@ const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favourites' }, boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' }, + polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' }, follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' }, }); @@ -79,6 +80,13 @@ class FilterBar extends React.PureComponent { > +