fix: Show push notifications settings except Safari (#1741)
This commit is contained in:
parent
d4c2a78db6
commit
df0d7262b4
3 changed files with 16 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
<button class="button small button--copy-code" @click="onCopy">
|
||||
{{ $t('COMPONENTS.CODE.BUTTON_TEXT') }}
|
||||
</button>
|
||||
<highlightjs :language="lang" :code="script" />
|
||||
<highlightjs v-if="script" :language="lang" :code="script" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -15,7 +15,7 @@ export default {
|
|||
props: {
|
||||
script: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
lang: {
|
||||
type: String,
|
||||
|
|
|
@ -79,7 +79,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="vapidPublicKey" class="profile--settings--row row push-row">
|
||||
<div
|
||||
v-if="vapidPublicKey && !isBrowserSafari"
|
||||
class="profile--settings--row row push-row"
|
||||
>
|
||||
<div class="columns small-3 ">
|
||||
<h4 class="block-title">
|
||||
{{ $t('PROFILE_SETTINGS.FORM.PUSH_NOTIFICATIONS_SECTION.TITLE') }}
|
||||
|
@ -202,6 +205,12 @@ export default {
|
|||
emailFlags: 'userNotificationSettings/getSelectedEmailFlags',
|
||||
pushFlags: 'userNotificationSettings/getSelectedPushFlags',
|
||||
}),
|
||||
isBrowserSafari() {
|
||||
if (window.browserConfig) {
|
||||
return window.browserConfig.is_safari === 'true';
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
emailFlags(value) {
|
||||
|
@ -285,9 +294,4 @@ export default {
|
|||
.notification--checkbox {
|
||||
font-size: $font-size-large;
|
||||
}
|
||||
|
||||
// Hide on Safari
|
||||
.push-row:not(:root:root) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -42,6 +42,10 @@
|
|||
selectedLocale: '<%= I18n.locale %>'
|
||||
}
|
||||
window.globalConfig = <%= raw @global_config.to_json %>
|
||||
window.browserConfig = {
|
||||
browser_name: '<%= browser.name %>',
|
||||
is_safari: '<%= browser.safari? %>'
|
||||
}
|
||||
window.errorLoggingConfig = '<%= ENV.fetch('SENTRY_DSN', '')%>'
|
||||
</script>
|
||||
<%= javascript_pack_tag 'application' %>
|
||||
|
|
Loading…
Reference in a new issue