-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add manifest.json, sw.js with pwa icons
- Loading branch information
1 parent
88b08d2
commit 08094c4
Showing
13 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"name": "Audiora", | ||
"short_name": "Audiora", | ||
"description": "Listen to anything, anytime, leveraging AI", | ||
"start_url": "/", | ||
"display": "standalone", | ||
"background_color": "#000000", | ||
"theme_color": "#000000", | ||
"icons": [ | ||
{ | ||
"src": "/icons/icon-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-96x96.png", | ||
"sizes": "96x96", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-128x128.png", | ||
"sizes": "128x128", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-144x144.png", | ||
"sizes": "144x144", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-152x152.png", | ||
"sizes": "152x152", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/icons/icon-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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' | ||
]; | ||
|
||
self.addEventListener('install', (event) => { | ||
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); | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
}); | ||
|
||
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; | ||
}); | ||
}) | ||
); | ||
}); |