Refactor code structure for improved readability and maintainability
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m31s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m31s
This commit is contained in:
BIN
frontend/vue-app/public/icons/icon-192x192.png
Normal file
BIN
frontend/vue-app/public/icons/icon-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
frontend/vue-app/public/icons/icon-512x512.png
Normal file
BIN
frontend/vue-app/public/icons/icon-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 188 KiB |
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"id": "/",
|
||||
"name": "Reward App",
|
||||
"short_name": "Rewards",
|
||||
"start_url": "/",
|
||||
@@ -9,8 +10,20 @@
|
||||
"icons": [
|
||||
{
|
||||
"src": "/favicon.ico",
|
||||
"sizes": "48x48",
|
||||
"sizes": "32x32",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
/* Service Worker for Reward App push notifications */
|
||||
|
||||
/* Activate immediately — no waiting for old tabs to close */
|
||||
self.addEventListener('install', function (event) {
|
||||
event.waitUntil(self.skipWaiting())
|
||||
})
|
||||
|
||||
self.addEventListener('activate', function (event) {
|
||||
event.waitUntil(self.clients.claim())
|
||||
})
|
||||
|
||||
self.addEventListener('push', function (event) {
|
||||
if (!event.data) return
|
||||
|
||||
@@ -13,6 +22,7 @@ self.addEventListener('push', function (event) {
|
||||
const title = payload.title || 'Reward App'
|
||||
const options = {
|
||||
body: payload.body || '',
|
||||
icon: '/icons/icon-192x192.png',
|
||||
data: payload,
|
||||
actions: [
|
||||
{ action: 'approve', title: 'Approve' },
|
||||
|
||||
Reference in New Issue
Block a user