lint
This commit is contained in:
parent
5aec0faa2c
commit
0a00ce025a
1 changed files with 8 additions and 3 deletions
|
|
@ -73,13 +73,18 @@ export const vuexPushNotificationsPlugin = (store) => {
|
||||||
// Initial state
|
// Initial state
|
||||||
const vapidPublicKey = useInstanceStore().vapidPublicKey
|
const vapidPublicKey = useInstanceStore().vapidPublicKey
|
||||||
const enabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
const enabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
||||||
const permissionGranted = useInterfaceStore().notificationPermission === 'granted'
|
const permissionGranted =
|
||||||
const permissionPresent = useInterfaceStore().notificationPermission !== undefined
|
useInterfaceStore().notificationPermission === 'granted'
|
||||||
|
const permissionPresent =
|
||||||
|
useInterfaceStore().notificationPermission !== undefined
|
||||||
const user = state.users.currentUser
|
const user = state.users.currentUser
|
||||||
|
|
||||||
if (!permissionPresent || !vapidPublicKey) return
|
if (!permissionPresent || !vapidPublicKey) return
|
||||||
|
|
||||||
if (mutation.type === 'setCurrentUser' || mutation.type === 'clearCurrentUser') {
|
if (
|
||||||
|
mutation.type === 'setCurrentUser' ||
|
||||||
|
mutation.type === 'clearCurrentUser'
|
||||||
|
) {
|
||||||
console.log(!!user, permissionGranted, enabled)
|
console.log(!!user, permissionGranted, enabled)
|
||||||
if (user && permissionGranted && enabled) {
|
if (user && permissionGranted && enabled) {
|
||||||
console.log('vuexReg')
|
console.log('vuexReg')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue