about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/notifications/components/filter_bar.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-13 19:29:54 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-13 19:29:54 +0100
commit65d9004ac90209a035e2f103e271986ff8650410 (patch)
treec6a19589c6ed6a47502c0779f1dc6bf04a604ef0 /app/javascript/mastodon/features/notifications/components/filter_bar.js
parentc6f018091e10aa28bd93d6439aaa571e71f99bea (diff)
Add UI for enabling/disabling poll notifications (#10255)
* 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
Diffstat (limited to 'app/javascript/mastodon/features/notifications/components/filter_bar.js')
-rw-r--r--app/javascript/mastodon/features/notifications/components/filter_bar.js8
1 files changed, 8 insertions, 0 deletions
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' },
 });
 
@@ -80,6 +81,13 @@ class FilterBar extends React.PureComponent {
           <Icon id='retweet' fixedWidth />
         </button>
         <button
+          className={selectedFilter === 'poll' ? 'active' : ''}
+          onClick={this.onClick('poll')}
+          title={intl.formatMessage(tooltips.polls)}
+        >
+          <Icon id='tasks' fixedWidth />
+        </button>
+        <button
           className={selectedFilter === 'follow' ? 'active' : ''}
           onClick={this.onClick('follow')}
           title={intl.formatMessage(tooltips.follows)}