diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-10-28 21:22:04 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-10-28 21:35:03 -0500 |
commit | 3de376650c700be81d893554b90ac8ce27646333 (patch) | |
tree | d3b0ca2da8b5f4f4f4cca5e5602293d8f89f50c4 /app/javascript/flavours/glitch/features | |
parent | f12ad9098f0608f558b92e36b4adeef2e8c28604 (diff) |
Make push notifications optional
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.js b/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.js index 8e77f5a03..0ba929711 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.js +++ b/app/javascript/flavours/glitch/features/notifications/components/notifications_permission_banner.js @@ -17,12 +17,17 @@ class NotificationsPermissionBanner extends React.PureComponent { this.props.dispatch(requestBrowserPermission()); } + handleClickDisable = () => { + window.location = '/settings/preferences/notifications'; + } + render () { return ( <div className='notifications-permission-banner'> <h2><FormattedMessage id='notifications_permission_banner.title' defaultMessage='Never miss a thing' /></h2> <p><FormattedMessage id='notifications_permission_banner.how_to_control' defaultMessage="To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled." values={{ icon: <Icon id='sliders' /> }} /></p> - <Button onClick={this.handleClick}><FormattedMessage id='notifications_permission_banner.enable' defaultMessage='Enable desktop notifications' /></Button> + <Button onClick={this.handleClick}><FormattedMessage id='notifications_permission_banner.enable' defaultMessage='Request' /></Button> + <Button onClick={this.handleClickDisable}><FormattedMessage id='notifications_permission_banner.disable' defaultMessage='Disable' /></Button> </div> ); } |