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:
@@ -78,14 +78,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getenv(myvar: any) {
|
||||
try {
|
||||
return process.env[myvar]
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getPermission() {
|
||||
return Notification.permission
|
||||
}
|
||||
@@ -123,7 +115,6 @@ export default defineComponent({
|
||||
appname,
|
||||
meta,
|
||||
mystilecard,
|
||||
getenv,
|
||||
getPermission,
|
||||
NotServiceWorker,
|
||||
PagLogin,
|
||||
|
||||
@@ -131,10 +131,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getenv(myvar: any) {
|
||||
return process.env[myvar]
|
||||
}
|
||||
|
||||
function initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', function (event) {
|
||||
// console.log('******************************** beforeinstallprompt fired')
|
||||
@@ -232,7 +228,6 @@ export default defineComponent({
|
||||
getappname,
|
||||
appname,
|
||||
mystilecard,
|
||||
getenv,
|
||||
getPermission,
|
||||
NotServiceWorker,
|
||||
PagLogin,
|
||||
|
||||
@@ -78,14 +78,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getenv(myvar: any) {
|
||||
try {
|
||||
return process.env[myvar]
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getPermission() {
|
||||
return Notification.permission
|
||||
}
|
||||
@@ -123,7 +115,6 @@ export default defineComponent({
|
||||
appname,
|
||||
meta,
|
||||
mystilecard,
|
||||
getenv,
|
||||
getPermission,
|
||||
NotServiceWorker,
|
||||
PagLogin,
|
||||
|
||||
Reference in New Issue
Block a user