Notification with Service Workers now is working!
When a Notification arrives, it save into the IndexDb, then in Vue.js call a polling to check in the db if there is a different record count. If is different then call a get to update the notification.
This commit is contained in:
@@ -25,6 +25,8 @@ import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { costanti } from '@costanti'
|
||||
import { IMyGroup } from '@model/UserStore'
|
||||
|
||||
import globalroutines from '../globalroutines/index'
|
||||
|
||||
export const DefaultUser: IUserFields = {
|
||||
_id: '',
|
||||
email: '',
|
||||
@@ -955,6 +957,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
return await this.setGlobal($router, isLogged)
|
||||
.then((loadstorage: any) => {
|
||||
console.log('RISULT setGlobal:', loadstorage)
|
||||
if (loadstorage) {
|
||||
|
||||
if ($q.screen.gt.sm) {
|
||||
@@ -969,7 +972,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}*/
|
||||
|
||||
|
||||
//++Todo PWA: globalroutines('loadapp', '')
|
||||
globalroutines('loadapp', '')
|
||||
|
||||
// Create Subscription to Push Notification
|
||||
globalStore.createPushSubscription()
|
||||
|
||||
Reference in New Issue
Block a user