From 055aaea3d02995614b044f66c4a72d68385b1463 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 9 Nov 2022 23:05:09 -0800 Subject: manifest and service worker --- src/app.html | 15 +++++++++++++++ static/manifest.json | 17 ----------------- static/manifest.webmanifest | 2 +- static/service-worker.js | 7 +++++++ 4 files changed, 23 insertions(+), 18 deletions(-) delete mode 100644 static/manifest.json create mode 100644 static/service-worker.js diff --git a/src/app.html b/src/app.html index 42e791f7..b3325f4c 100644 --- a/src/app.html +++ b/src/app.html @@ -6,9 +6,24 @@ + %sveltekit.head%
%sveltekit.body%
+ diff --git a/static/manifest.json b/static/manifest.json deleted file mode 100644 index 3ce34fb8..00000000 --- a/static/manifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "short_name": "coinos", - "name": "coinos", - "icons": [ - { - "src": "/icons/coinos.png", - "type": "image/webp", - "sizes": "1024x1024", - "purpose": "any maskable" - } - ], - "start_url": "/", - "background_color": "#000000", - "display": "standalone", - "scope": "/", - "theme_color": "#000000" -} diff --git a/static/manifest.webmanifest b/static/manifest.webmanifest index f77d93c7..edd56cd7 100644 --- a/static/manifest.webmanifest +++ b/static/manifest.webmanifest @@ -1,7 +1,7 @@ { "theme_color": "#fff", "background_color": "#000", - "display": "fullscreen", + "display": "standalone", "scope": "/", "start_url": "/", "name": "Coinos", diff --git a/static/service-worker.js b/static/service-worker.js new file mode 100644 index 00000000..7952231d --- /dev/null +++ b/static/service-worker.js @@ -0,0 +1,7 @@ +self.addEventListener('fetch', function(event) { + event.respondWith( + caches.match(event.request).then(function(response) { + return response || fetch(event.request); + }) + ); +}); -- cgit v1.2.3