diff --git a/app/static/manifest.json b/app/static/manifest.json index 081ca08..91a957c 100644 --- a/app/static/manifest.json +++ b/app/static/manifest.json @@ -1,4 +1,5 @@ { + "id": "/", "name": "Audiora", "short_name": "Audiora", "description": "Listen to anything, anytime, leveraging AI", @@ -36,7 +37,7 @@ "src": "/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png", - "purpose": "any maskable" + "purpose": "maskable" }, { "src": "/icons/icon-384x384.png", @@ -48,5 +49,20 @@ "sizes": "512x512", "type": "image/png" } + ], + "screenshots": [ + { + "src": "/screenshots/desktop.png", + "sizes": "1280x800", + "type": "image/png", + "form_factor": "wide", + "label": "Audiora Desktop Experience" + }, + { + "src": "/screenshots/mobile.png", + "sizes": "390x844", + "type": "image/png", + "label": "Audiora Mobile Experience" + } ] } diff --git a/app/static/screenshots/desktop.png b/app/static/screenshots/desktop.png new file mode 100644 index 0000000..a61df9d Binary files /dev/null and b/app/static/screenshots/desktop.png differ diff --git a/app/static/screenshots/mobile.png b/app/static/screenshots/mobile.png new file mode 100644 index 0000000..0895c57 Binary files /dev/null and b/app/static/screenshots/mobile.png differ diff --git a/app/static/sw.js b/app/static/sw.js index c4d1ff2..b184cf5 100644 --- a/app/static/sw.js +++ b/app/static/sw.js @@ -1,53 +1,51 @@ const CACHE_NAME = 'audiora-v1'; const urlsToCache = [ - '/', - '/manifest.json', - '/icons/icon-72x72.png', - '/icons/icon-96x96.png', - '/icons/icon-128x128.png', - '/icons/icon-144x144.png', - '/icons/icon-152x152.png', - '/icons/icon-192x192.png', - '/icons/icon-384x384.png', - '/icons/icon-512x512.png' + '/', + '/manifest.json', + '/icons/icon-72x72.png', + '/icons/icon-96x96.png', + '/icons/icon-128x128.png', + '/icons/icon-144x144.png', + '/icons/icon-152x152.png', + '/icons/icon-192x192.png', + '/icons/icon-384x384.png', + '/icons/icon-512x512.png' ]; self.addEventListener('install', (event) => { - event.waitUntil( - caches.open(CACHE_NAME).then((cache) => cache.addAll(urlsToCache)) - ); + event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(urlsToCache))); }); self.addEventListener('activate', (event) => { - event.waitUntil( - caches.keys().then((cacheNames) => { - return Promise.all( - cacheNames.map((cacheName) => { - if (cacheName !== CACHE_NAME) { - return caches.delete(cacheName); - } - }) - ); - }) - ); + event.waitUntil( + caches.keys().then((cacheNames) => { + return Promise.all( + cacheNames.map((cacheName) => { + if (cacheName !== CACHE_NAME) { + return caches.delete(cacheName); + } + }) + ); + }) + ); }); self.addEventListener('fetch', (event) => { - event.respondWith( - caches.match(event.request).then((response) => { - if (response) { - return response; - } - return fetch(event.request).then((response) => { - if (!response || response.status !== 200 || response.type !== 'basic') { - return response; - } - const responseToCache = response.clone(); - caches.open(CACHE_NAME).then((cache) => { - cache.put(event.request, responseToCache); - }); - return response; - }); - }) - ); + event.respondWith( + caches.match(event.request).then((response) => { + if (response) { + return response; + } + return fetch(event.request).then((response) => { + if (!response || response.status !== 200 || response.type !== 'basic') { + return response; + } + const responseToCache = response.clone(); + caches.open(CACHE_NAME).then((cache) => { + cache.put(event.request, responseToCache); + }); + return response; + }); + }) + ); });