mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-08 23:33:16 +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
46
docs/BRANDING.md
Normal file
46
docs/BRANDING.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Branding Guide
|
||||
|
||||
This project supports **external-first branding**.
|
||||
Put your branding assets under `_local/branding`, and Oclaw will use them first.
|
||||
If an external file is missing, Oclaw falls back to built-in defaults.
|
||||
|
||||
## Directory
|
||||
|
||||
Create this folder in the repository root:
|
||||
|
||||
`_local/branding/`
|
||||
|
||||
## Supported Files
|
||||
|
||||
- `logo.svg`
|
||||
- Used by admin sidebar logo and chat assistant logo/avatar.
|
||||
- URL path: `/admin/brand-assets/logo.svg`
|
||||
- `desktop.ico` (recommended on Windows)
|
||||
- Preferred desktop window icon for Electron.
|
||||
- `logo.png` (desktop fallback)
|
||||
- Used as desktop icon fallback when `desktop.ico` is absent.
|
||||
|
||||
## Resolution Order
|
||||
|
||||
### Web UI (Admin + Chat)
|
||||
|
||||
1. `_local/branding/logo.svg`
|
||||
2. Built-in fallback: `interfaces/admin/static/oliver.svg`
|
||||
|
||||
### Desktop (Electron window icon)
|
||||
|
||||
1. `_local/branding/desktop.ico`
|
||||
2. `_local/branding/logo.png`
|
||||
3. `_local/branding/logo.svg`
|
||||
4. Built-in fallback: `interfaces/admin/static/oliver.svg`
|
||||
|
||||
## How to Apply
|
||||
|
||||
1. Put your files into `_local/branding/`.
|
||||
2. Restart gateway (and desktop app if using Electron).
|
||||
3. Hard refresh browser page if needed.
|
||||
|
||||
## Notes
|
||||
|
||||
- `/admin/brand-assets/*` is served with no-cache headers to reduce stale asset issues.
|
||||
- `_local/*` is git-ignored by default, so tenant/customer branding stays local.
|
||||
Loading…
Add table
Add a link
Reference in a new issue