Add non-maskable PWA icons

It seems Chromium cannot use maskable icons.  It complains that the
"purpose" must contain "any", however maskable icons are not suitable
for the "any" purpose.

So, add pre-masked icons to be used for the "any" purpose.
This commit is contained in:
Asher
2025-07-07 14:20:07 -08:00
parent 729456b10d
commit 70be9fe541
6 changed files with 28 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -186,12 +186,22 @@ router.get("/manifest.json", async (req, res) => {
display: "fullscreen",
display_override: ["window-controls-overlay"],
description: "Run Code on a remote server.",
icons: [192, 512].map((size) => ({
src: `{{BASE}}/_static/src/browser/media/pwa-icon-${size}.png`,
type: "image/png",
sizes: `${size}x${size}`,
purpose: "maskable",
})),
icons: [192, 512]
.map((size) => [
{
src: `{{BASE}}/_static/src/browser/media/pwa-icon-${size}.png`,
type: "image/png",
sizes: `${size}x${size}`,
purpose: "any",
},
{
src: `{{BASE}}/_static/src/browser/media/pwa-icon-maskable-${size}.png`,
type: "image/png",
sizes: `${size}x${size}`,
purpose: "maskable",
},
])
.flat(),
},
null,
2,