From 76a149c8eee0349abe7e47ede366a067aa2177ac Mon Sep 17 00:00:00 2001 From: proletarius101 <54175165+proletarius101@users.noreply.github.com> Date: Thu, 28 Oct 2021 23:36:27 +0800 Subject: [PATCH] merge web app manifests (#708) Right now here are 2 web app manifests: - public/favicon/site.webmanifest - public/manifest.json But only the 1st one is referred in the html This commit - merged them into public/site.webmanifest (according to https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen#manifest, it should be in the root, whereas the spec suggests the `.webmanifest` extension - complete the required fields It now passes the Lighthouse PWA manifest test in Chrome --- app/views/application/app.html.erb | 2 +- index.html | 2 +- public/manifest.json | 25 ------------------- public/manifest.webmanifest | 39 ++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 27 deletions(-) delete mode 100644 public/manifest.json create mode 100644 public/manifest.webmanifest diff --git a/app/views/application/app.html.erb b/app/views/application/app.html.erb index 7c3ec0d6f..2911e7e4a 100644 --- a/app/views/application/app.html.erb +++ b/app/views/application/app.html.erb @@ -10,7 +10,7 @@ - + diff --git a/index.html b/index.html index 34933df57..07e6c45bc 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ - + diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index f59c71b89..000000000 --- a/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "app": { - "launch": { - "urls": [ - "https://app.standardnotes.com/" - ], - "web_url": "https://app.standardnotes.com", - "container": "tab" - } - }, - "offline_enabled": true, - "permissions": [], - "requirements": { - "3D": { - "features": [] - } - }, - "icons": { - "128": "favicon/android-chrome-192x192.png" - }, - "name": "Standard Notes", - "description": "A Simple And Private Notes App", - "version": "1.0", - "manifest_version": 2 -} diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest new file mode 100644 index 000000000..430f5516a --- /dev/null +++ b/public/manifest.webmanifest @@ -0,0 +1,39 @@ +{ + "app": { + "launch": { + "urls": [ + "https://app.standardnotes.com/" + ], + "web_url": "https://app.standardnotes.com", + "container": "tab" + } + }, + "offline_enabled": true, + "permissions": [], + "requirements": { + "3D": { + "features": [] + } + }, + "icons": [ + { + "src": "favicon/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "favicon/android-chrome-512x512.png", + "sizes": "512x512", + "purpose": "any maskable", + "type": "image/png" + } + ], + "name": "Standard Notes", + "description": "A Simple And Private Notes App", + "version": "1.0", + "manifest_version": 2, + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone", + "start_url": ".." +}