From ffba43592320320cbf8ba3dcf8a08a4452572e88 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Thu, 18 Oct 2018 14:21:35 +0200 Subject: [PATCH] fix #10756: do not show push notification settings for email only notifications --- website/client/components/settings/notifications.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/client/components/settings/notifications.vue b/website/client/components/settings/notifications.vue index b92f6de0e6..45504395b0 100644 --- a/website/client/components/settings/notifications.vue +++ b/website/client/components/settings/notifications.vue @@ -32,7 +32,7 @@ td input(type='checkbox', v-model='user.preferences.emailNotifications[notification]', @change='set("emailNotifications", notification)') - td + td(v-if="onlyEmailsIds.indexOf(notification) === -1") input(type='checkbox', v-model='user.preferences.pushNotifications[notification]', @change='set("pushNotifications", notification)') hr @@ -46,7 +46,7 @@ export default { mixins: [notificationsMixin], data () { return { - notificationsIds: [ + notificationsIds: Object.freeze([ 'newPM', 'wonChallenge', 'giftedGems', @@ -59,7 +59,13 @@ export default { 'importantAnnouncements', 'weeklyRecaps', 'onboarding', - ], + ]), + // list of email-only notifications + onlyEmailsIds: Object.freeze([ + 'importantAnnouncements', + 'weeklyRecaps', + 'onboarding', + ]), }; }, computed: {