feat: add screenshots/categories to web app manifest (#1993)

* feat: add screenshots/categories to web app manifest

fixes #1971

* fix: whoops forgot the screenshots
This commit is contained in:
Nolan Lawson 2021-03-14 13:39:11 -07:00 committed by GitHub
parent 5e7440aaee
commit cf0f1d884a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 0 deletions

View file

@ -33,6 +33,7 @@ const assets = __assets__
.filter(filename => !filename.includes('traineddata.gz')) // cache on-demand .filter(filename => !filename.includes('traineddata.gz')) // cache on-demand
.filter(filename => !filename.endsWith('.webapp')) // KaiOS manifest .filter(filename => !filename.endsWith('.webapp')) // KaiOS manifest
.filter(filename => !/emoji-.*?\.json$/.test(filename)) // useless to cache; it already goes in IndexedDB .filter(filename => !/emoji-.*?\.json$/.test(filename)) // useless to cache; it already goes in IndexedDB
.filter(filename => !/screenshot-.*?\.png/.test(filename)) // only used during PWA installation, don't bother caching
// `shell` is an array of all the files generated by webpack // `shell` is an array of all the files generated by webpack
// also contains '/index.html' for some reason // also contains '/index.html' for some reason

View file

@ -4,6 +4,9 @@
"name": "Pinafore for Mastodon", "name": "Pinafore for Mastodon",
"short_name": "Pinafore", "short_name": "Pinafore",
"description": "Alternative web client for Mastodon, focused on speed and simplicity.", "description": "Alternative web client for Mastodon, focused on speed and simplicity.",
"categories": [
"social"
],
"display": "standalone", "display": "standalone",
"start_url": "/?pwa=true", "start_url": "/?pwa=true",
"share_target": { "share_target": {
@ -108,5 +111,22 @@
"type": "image/png", "type": "image/png",
"purpose": "maskable" "purpose": "maskable"
} }
],
"screenshots": [
{
"src": "screenshot-540-720-1.png",
"type": "image/png",
"sizes": "540x720"
},
{
"src": "screenshot-540-720-2.png",
"type": "image/jpeg",
"sizes": "540x720"
},
{
"src": "screenshot-540-720-3.png",
"type": "image/jpeg",
"sizes": "540x720"
}
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB