feat(软件图标): 新增PNG和ICO图标支持
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-17 17:48:20 +08:00
1 parent 8e31f888d3
commit 2d16fc833d
6 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -22,12 +22,12 @@ import (
// FS WebUI嵌入静态文件 // FS WebUI嵌入静态文件
// //
//go:embed index.html ofdgo.css ofdgo.js ofdgo.json ofdgo.svg ofdgo.wasm ofdgo_edit.js ofdgo_font.js ofdgo_host.js ofdgo_wasm.js ofdgo_work.js wasm_exec.js //go:embed index.html ofdgo.css ofdgo.ico ofdgo.js ofdgo.json ofdgo.png ofdgo.svg ofdgo.wasm ofdgo_edit.js ofdgo_font.js ofdgo_host.js ofdgo_wasm.js ofdgo_work.js wasm_exec.js
var FS embed.FS var FS embed.FS
// NativeFS WebView嵌入静态文件 // NativeFS WebView嵌入静态文件
// //
//go:embed index.html ofdgo.css ofdgo.js ofdgo.json ofdgo.svg ofdgo_edit.js ofdgo_font.js ofdgo_host.js //go:embed index.html ofdgo.css ofdgo.ico ofdgo.js ofdgo.json ofdgo.png ofdgo.svg ofdgo_edit.js ofdgo_font.js ofdgo_host.js
var NativeFS embed.FS var NativeFS embed.FS
// Checksum 计算WebUI嵌入资源校验值 // Checksum 计算WebUI嵌入资源校验值
+1
View File
@@ -6,6 +6,7 @@
<meta name="theme-color" content="#fbfcfd"> <meta name="theme-color" content="#fbfcfd">
<title>OFDGo WebUI - OFD编辑器</title> <title>OFDGo WebUI - OFD编辑器</title>
<link rel="manifest" href="./ofdgo.json"> <link rel="manifest" href="./ofdgo.json">
<link rel="icon" type="image/x-icon" sizes="16x16 32x32 48x48 64x64 128x128 256x256" href="./ofdgo.ico">
<link rel="icon" type="image/svg+xml" href="./ofdgo.svg"> <link rel="icon" type="image/svg+xml" href="./ofdgo.svg">
<link rel="stylesheet" href="./ofdgo.css"> <link rel="stylesheet" href="./ofdgo.css">
</head> </head>
Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

+6
View File
@@ -22,6 +22,12 @@
"src": "./ofdgo.svg", "src": "./ofdgo.svg",
"sizes": "any", "sizes": "any",
"type": "image/svg+xml" "type": "image/svg+xml"
},
{
"src": "./ofdgo.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
} }
] ]
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
const CACHE_PREFIX = `ofdgo:${self.registration.scope}:app:`; const CACHE_PREFIX = `ofdgo:${self.registration.scope}:app:`;
const META_CACHE = `${CACHE_PREFIX}meta`; const META_CACHE = `${CACHE_PREFIX}meta`;
const ASSETS = ["./", "ofdgo.css", "ofdgo.js", "ofdgo.json", "ofdgo.svg", "ofdgo.wasm", "ofdgo_edit.js", "ofdgo_font.js", "ofdgo_host.js", "ofdgo_wasm.js", "ofdgo_work.js", "wasm_exec.js"] const ASSETS = ["./", "ofdgo.css", "ofdgo.ico", "ofdgo.js", "ofdgo.json", "ofdgo.png", "ofdgo.svg", "ofdgo.wasm", "ofdgo_edit.js", "ofdgo_font.js", "ofdgo_host.js", "ofdgo_wasm.js", "ofdgo_work.js", "wasm_exec.js"]
.map((path) => new URL(path, self.registration.scope).href); .map((path) => new URL(path, self.registration.scope).href);
const CLIENT_PREFIX = new URL("__client/", self.registration.scope).href; const CLIENT_PREFIX = new URL("__client/", self.registration.scope).href;