-
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.
Merge pull request #5 from sdasda7777/sdasda7777_pages4
Added files from eframe_template
- Loading branch information
Showing
7 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,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" | ||
} |
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,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); | ||
}) | ||
); | ||
}); |