feat(品牌): 支持 _local 外部优先 Logo 与图标覆盖

新增 /admin/brand-assets 静态挂载,并在前端与桌面端统一采用外部优先、内置兜底的品牌资源解析;同时补充 BRANDING 文档与 README 入口说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-07 10:12:16 +08:00
parent b15ff4c31c
commit acf1266e90
7 changed files with 106 additions and 13 deletions

View file

@ -6,7 +6,11 @@ const pngToIco = typeof pngToIcoModule === "function" ? pngToIcoModule : pngToIc
async function main() {
const desktopRoot = path.resolve(__dirname, "..");
const svgPath = path.resolve(desktopRoot, "..", "src", "admin", "static", "oliver.svg");
const svgCandidates = [
path.resolve(desktopRoot, "..", "_local", "branding", "logo.svg"),
path.resolve(desktopRoot, "..", "interfaces", "admin", "static", "oliver.svg"),
];
const svgPath = svgCandidates.find((p) => fs.existsSync(p)) || svgCandidates[svgCandidates.length - 1];
const assetsDir = path.join(desktopRoot, "assets");
const icoPath = path.join(assetsDir, "oclaw.ico");