chore: Enable push permissions if available (#6474)
This commit is contained in:
@@ -235,7 +235,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="vapidPublicKey && !isBrowserSafari"
|
v-if="vapidPublicKey && hasPushAPISupport"
|
||||||
class="profile--settings--row row push-row"
|
class="profile--settings--row row push-row"
|
||||||
>
|
>
|
||||||
<div class="columns small-3 ">
|
<div class="columns small-3 ">
|
||||||
@@ -393,11 +393,8 @@ export default {
|
|||||||
pushFlags: 'userNotificationSettings/getSelectedPushFlags',
|
pushFlags: 'userNotificationSettings/getSelectedPushFlags',
|
||||||
uiSettings: 'getUISettings',
|
uiSettings: 'getUISettings',
|
||||||
}),
|
}),
|
||||||
isBrowserSafari() {
|
hasPushAPISupport() {
|
||||||
if (window.browserConfig) {
|
return !!('Notification' in window);
|
||||||
return window.browserConfig.is_safari === 'true';
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
window.globalConfig = <%= raw @global_config.to_json %>
|
window.globalConfig = <%= raw @global_config.to_json %>
|
||||||
window.browserConfig = {
|
window.browserConfig = {
|
||||||
browser_name: '<%= browser.name %>',
|
browser_name: '<%= browser.name %>',
|
||||||
is_safari: '<%= browser.safari? %>'
|
|
||||||
}
|
}
|
||||||
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
|
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user