mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 17:40:44 +08:00
feat(品牌): 支持 _local 外部优先 Logo 与图标覆盖
新增 /admin/brand-assets 静态挂载,并在前端与桌面端统一采用外部优先、内置兜底的品牌资源解析;同时补充 BRANDING 文档与 README 入口说明。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b15ff4c31c
commit
acf1266e90
7 changed files with 106 additions and 13 deletions
|
|
@ -9,7 +9,20 @@ const DEFAULT_HOST = "127.0.0.1";
|
|||
const DEFAULT_PORT = 8787;
|
||||
const APP_DISPLAY_NAME = "oclaw";
|
||||
const APP_ROOT = path.resolve(__dirname, "..", "..");
|
||||
const APP_ICON_PATH = path.join(APP_ROOT, "src", "admin", "static", "oliver.svg");
|
||||
const APP_ICON_PATH = (() => {
|
||||
const candidates = [
|
||||
path.join(APP_ROOT, "_local", "branding", "desktop.ico"),
|
||||
path.join(APP_ROOT, "_local", "branding", "logo.png"),
|
||||
path.join(APP_ROOT, "_local", "branding", "logo.svg"),
|
||||
path.join(APP_ROOT, "interfaces", "admin", "static", "oliver.svg"),
|
||||
];
|
||||
for (const p of candidates) {
|
||||
try {
|
||||
if (fs.existsSync(p)) return p;
|
||||
} catch (_) {}
|
||||
}
|
||||
return candidates[candidates.length - 1];
|
||||
})();
|
||||
const DATA_ROOT = path.join(app.getPath("userData"), "runtime-data");
|
||||
const LOG_ROOT = path.join(app.getPath("userData"), "logs");
|
||||
const BACKEND_LOG_FILE = path.join(LOG_ROOT, "backend.log");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue