mirror of
https://github.com/coder/code-server.git
synced 2026-04-13 21:32:52 -05:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user