feat(独立应用): OFDGo WebUI支持安装为独立应用,统一图标与窗口配色
build.yaml / build (push) Successful in 38s

This commit is contained in:
xiaoqidun committed 2026-09-08 22:23:44 +08:00
1 parent 8b123698e5
commit 367a9b98e9
5 files changed
+26 -2

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ import (
// FS WebUI嵌入静态文件 // FS WebUI嵌入静态文件
// //
//go:embed index.html ofdgo.css ofdgo.js ofdgo.sw.js ofdgo.wasm wasm_exec.js //go:embed index.html ofdgo.css ofdgo.js ofdgo.json ofdgo.svg ofdgo.sw.js ofdgo.wasm wasm_exec.js
var FS embed.FS var FS embed.FS
// Checksum 计算WebUI嵌入资源校验值 // Checksum 计算WebUI嵌入资源校验值
+3
View File
@@ -3,7 +3,10 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#fbfcfd">
<title>OFDGo WebUI</title> <title>OFDGo WebUI</title>
<link rel="manifest" href="./ofdgo.json">
<link rel="icon" type="image/svg+xml" href="./ofdgo.svg">
<link rel="stylesheet" href="./ofdgo.css"> <link rel="stylesheet" href="./ofdgo.css">
</head> </head>
<body> <body>
+17
View File
@@ -0,0 +1,17 @@
{
"id": "./",
"name": "OFDGo WebUI",
"short_name": "OFDGo",
"start_url": "./",
"scope": "./",
"display": "standalone",
"background_color": "#eef1f4",
"theme_color": "#fbfcfd",
"icons": [
{
"src": "./ofdgo.svg",
"sizes": "any",
"type": "image/svg+xml"
}
]
}
+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" fill="none" stroke="#0f7b68" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
</svg>

After

Width:  |  Height:  |  Size: 296 B

+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", "wasm_exec.js", "ofdgo.wasm", "ofdgo.sw.js"] const ASSETS = ["./", "ofdgo.css", "ofdgo.js", "ofdgo.json", "ofdgo.svg", "ofdgo.sw.js", "ofdgo.wasm", "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;