From 3a2fe740c1a917383a0314c239434bc43f977095 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 24 Sep 2019 00:50:42 -0700 Subject: [PATCH] feat: add KaiOS manifest file (#1528) --- src/service-worker.js | 1 + static/manifest.webapp | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 static/manifest.webapp diff --git a/src/service-worker.js b/src/service-worker.js index f9d21007..a4353814 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -19,6 +19,7 @@ const assets = __assets__ .filter(filename => !filename.endsWith('.map')) .filter(filename => filename !== '/robots.txt') .filter(filename => !filename.includes('traineddata.gz')) // Tesseract already caches it in IDB + .filter(filename => !filename.endsWith('.webapp')) // KaiOS manifest // `shell` is an array of all the files generated by webpack // also contains '/index.html' for some reason diff --git a/static/manifest.webapp b/static/manifest.webapp new file mode 100644 index 00000000..4fff47e3 --- /dev/null +++ b/static/manifest.webapp @@ -0,0 +1,37 @@ +{ + "version": "1.0.0", + "name": "Pinafore", + "description": "Mastodon client", + "type": "web", + "launch_path": "/", + "icons": { + "48": "/icon-48.png", + "72": "/icon-72.png", + "96": "/icon-96.png" + }, + "developer": { + "name": "Nolan Lawson", + "url": "https://nolanlawson.com" + }, + "locales": { + "en-US": { + "name": "Pinafore", + "subtitle": "Mastodon client", + "description": "Mastodon client, focused on speed and simplicity." + } + }, + "default_locale": "en-US", + "permissions": { + "serviceworker": { + "description": "Needed for offline storage and notifications." + }, + "desktop-notification": { + "description": "Needed for notifications." + } + }, + "messages": [ + { + "serviceworker-notification": "/" + } + ] +}