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

This commit is contained in:
2026-04-16 16:49:54 -04:00
parent 308bf0cc72
commit 43d647a712
7 changed files with 78 additions and 51 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -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"
}
]
}

View File

@@ -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' },