From dfac877957f000cfbaf517546a01489199640655 Mon Sep 17 00:00:00 2001 From: XQ Date: Fri, 12 Aug 2022 21:30:59 +0800 Subject: [PATCH] feat: add `manifest.json` for pwa (#144) * chore: update `i18nStore` * feat: add pwa `manifest.json` --- web/index.html | 8 ++++++++ web/public/manifest.json | 18 ++++++++++++++++++ web/public/sw.js | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 web/public/manifest.json create mode 100644 web/public/sw.js diff --git a/web/index.html b/web/index.html index 252895a1..bbfb1370 100644 --- a/web/index.html +++ b/web/index.html @@ -5,10 +5,18 @@ + Memos
+ diff --git a/web/public/manifest.json b/web/public/manifest.json new file mode 100644 index 00000000..fa143857 --- /dev/null +++ b/web/public/manifest.json @@ -0,0 +1,18 @@ +{ + "short_name": "Memos", + "name": "Memos", + "icons": [ + { + "src": "/logo.png", + "type": "image/png", + "sizes": "200x200" + } + ], + "start_url": "/", + "background_color": "#f6f5f4", + "display": "standalone", + "scope": "/", + "theme_color": "#f6f5f4", + "description": "usememos/memos" + } + \ No newline at end of file diff --git a/web/public/sw.js b/web/public/sw.js new file mode 100644 index 00000000..aeee59a0 --- /dev/null +++ b/web/public/sw.js @@ -0,0 +1,10 @@ +self.addEventListener("install", (event) => { + event.waitUntil((async () => {})()); + }); + + self.addEventListener("activate", (event) => { + event.waitUntil((async () => {})()); + }); + + self.addEventListener("fetch", (event) => {}); + \ No newline at end of file