This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/components/desktop-notification-config.hbs

21 lines
877 B
Handlebars

{{#if isNotSupported}}
{{d-button icon="bell-slash" label="user.desktop_notifications.not_supported" disabled="true"}}
{{/if}}
{{#if isDefaultPermission}}
{{d-button icon="bell-slash" label="user.desktop_notifications.perm_default" action="requestPermission"}}
{{/if}}
{{#if isDeniedPermission}}
{{d-button icon="bell-slash" label="user.desktop_notifications.perm_denied_btn" action="recheckPermission" disabled='true'}}
{{i18n "user.desktop_notifications.perm_denied_expl"}}
{{/if}}
{{#if isGrantedPermission}}
{{#if isEnabled}}
{{d-button icon="bell-slash-o" label="user.desktop_notifications.disable" action="turnoff"}}
{{i18n "user.desktop_notifications.currently_enabled"}}
{{else}}
{{d-button icon="bell-o" label="user.desktop_notifications.enable" action="turnon"}}
{{i18n "user.desktop_notifications.currently_disabled"}}
{{/if}}
{{/if}}