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