chore: Enable push permissions if available (#6474)

This commit is contained in:
Pranav Raj S
2023-02-17 08:43:28 -08:00
committed by GitHub
parent 4d719a8fe3
commit b479b7c6d7
2 changed files with 3 additions and 7 deletions

View File

@@ -235,7 +235,7 @@
</div>
</div>
<div
v-if="vapidPublicKey && !isBrowserSafari"
v-if="vapidPublicKey && hasPushAPISupport"
class="profile--settings--row row push-row"
>
<div class="columns small-3 ">
@@ -393,11 +393,8 @@ export default {
pushFlags: 'userNotificationSettings/getSelectedPushFlags',
uiSettings: 'getUISettings',
}),
isBrowserSafari() {
if (window.browserConfig) {
return window.browserConfig.is_safari === 'true';
}
return false;
hasPushAPISupport() {
return !!('Notification' in window);
},
},
watch: {

View File

@@ -49,7 +49,6 @@
window.globalConfig = <%= raw @global_config.to_json %>
window.browserConfig = {
browser_name: '<%= browser.name %>',
is_safari: '<%= browser.safari? %>'
}
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
</script>