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:
@@ -1,11 +1,11 @@
|
||||
// import { useGlobalStore } from '@store/globalStore'
|
||||
// import indexdb from './indexdb'
|
||||
|
||||
|
||||
import indexdb from './indexdb'
|
||||
|
||||
import { idbKeyval as storage } from '@src/js/storage'
|
||||
|
||||
export default async (cmd: string, table: string, data: any = null, id = '') => {
|
||||
export default async (cmd: string, table: string, data: any = null, id: any = '') => {
|
||||
// const globalStore = useGlobalStore()
|
||||
|
||||
// const descr = data !== null ? data.descr : ''
|
||||
|
||||
Reference in New Issue
Block a user