mirror of
https://github.com/coder/code-server.git
synced 2026-04-13 11:38:50 -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:
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 |
BIN
src/browser/media/pwa-icon-maskable-192.png
Normal file
BIN
src/browser/media/pwa-icon-maskable-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/browser/media/pwa-icon-maskable-512.png
Normal file
BIN
src/browser/media/pwa-icon-maskable-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -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