From 02c0e15781fa0a499c736e710755e799bfaec77d Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 13 Dec 2018 00:03:50 +0700 Subject: add checkbox to disable web push --- src/components/settings/settings.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/components/settings/settings.js') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 91a2014a..ca8543d1 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -45,6 +45,7 @@ const settings = { scopeCopyLocal: user.scopeCopy, scopeCopyDefault: this.$t('settings.values.' + instance.scopeCopy), stopGifs: user.stopGifs, + webPushNotificationsLocal: user.webPushNotifications, loopSilentAvailable: // Firefox Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || @@ -134,6 +135,10 @@ const settings = { }, stopGifs (value) { this.$store.dispatch('setOption', { name: 'stopGifs', value }) + }, + webPushNotificationsLocal (value) { + this.$store.dispatch('setOption', { name: 'webPushNotifications', value }) + if (value) this.$store.dispatch('registerPushNotifications') } } } -- cgit v1.2.3-70-g09d2