Initial commit
This commit is contained in:
BIN
assets/favicon.ico
Executable file
BIN
assets/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
assets/icon-1024.png
Normal file
BIN
assets/icon-1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 314 KiB |
BIN
assets/icon-256.png
Normal file
BIN
assets/icon-256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
BIN
assets/icon_ios_touch_192.png
Normal file
BIN
assets/icon_ios_touch_192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
28
assets/manifest.json
Normal file
28
assets/manifest.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "egui Template PWA",
|
||||
"short_name": "egui-template-pwa",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./icon-256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./maskable_icon_x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "./icon-1024.png",
|
||||
"sizes": "1024x1024",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"lang": "en-US",
|
||||
"id": "/index.html",
|
||||
"start_url": "./index.html",
|
||||
"display": "standalone",
|
||||
"background_color": "white",
|
||||
"theme_color": "white"
|
||||
}
|
||||
BIN
assets/maskable_icon_x512.png
Normal file
BIN
assets/maskable_icon_x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
25
assets/sw.js
Normal file
25
assets/sw.js
Normal file
@@ -0,0 +1,25 @@
|
||||
var cacheName = 'egui-template-pwa';
|
||||
var filesToCache = [
|
||||
'./',
|
||||
'./index.html',
|
||||
'./eframe_template.js',
|
||||
'./eframe_template_bg.wasm',
|
||||
];
|
||||
|
||||
/* Start the service worker and cache all of the app's content */
|
||||
self.addEventListener('install', function (e) {
|
||||
e.waitUntil(
|
||||
caches.open(cacheName).then(function (cache) {
|
||||
return cache.addAll(filesToCache);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
/* Serve cached content when offline */
|
||||
self.addEventListener('fetch', function (e) {
|
||||
e.respondWith(
|
||||
caches.match(e.request).then(function (response) {
|
||||
return response || fetch(e.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user