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
|
||||
const vapidPublicKey = useInstanceStore().vapidPublicKey
|
||||
const enabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
||||
const permissionGranted = useInterfaceStore().notificationPermission === 'granted'
|
||||
const permissionPresent = useInterfaceStore().notificationPermission !== undefined
|
||||
const permissionGranted =
|
||||
useInterfaceStore().notificationPermission === 'granted'
|
||||
const permissionPresent =
|
||||
useInterfaceStore().notificationPermission !== undefined
|
||||
const user = state.users.currentUser
|
||||
|
||||
if (!permissionPresent || !vapidPublicKey) return
|
||||
|
||||
if (mutation.type === 'setCurrentUser' || mutation.type === 'clearCurrentUser') {
|
||||
if (
|
||||
mutation.type === 'setCurrentUser' ||
|
||||
mutation.type === 'clearCurrentUser'
|
||||
) {
|
||||
console.log(!!user, permissionGranted, enabled)
|
||||
if (user && permissionGranted && enabled) {
|
||||
console.log('vuexReg')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue