aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings/settings.js
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2018-12-13 00:03:50 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2018-12-13 00:03:50 +0700
commit02c0e15781fa0a499c736e710755e799bfaec77d (patch)
tree0defdd796fb4e42e0e228d912622a6bbcc67db89 /src/components/settings/settings.js
parentee70ec4c7efb49c08f0a76b6b2694c0e9910978c (diff)
add checkbox to disable web push
Diffstat (limited to 'src/components/settings/settings.js')
-rw-r--r--src/components/settings/settings.js5
1 files changed, 5 insertions, 0 deletions
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')
}
}
}