mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix: keep Control UI logo root-relative
This commit is contained in:
@@ -111,15 +111,15 @@ describe("agentLogoUrl", () => {
|
||||
expect(agentLogoUrl("/apps/openclaw/")).toBe("/apps/openclaw/favicon.svg");
|
||||
});
|
||||
|
||||
it("uses a route-relative fallback before basePath bootstrap finishes", () => {
|
||||
expect(agentLogoUrl("")).toBe("favicon.svg");
|
||||
it("uses a root-relative fallback when no basePath is configured", () => {
|
||||
expect(agentLogoUrl("")).toBe("/favicon.svg");
|
||||
});
|
||||
});
|
||||
|
||||
describe("assistantAvatarFallbackUrl", () => {
|
||||
it("uses the bundled Molty png for assistant profile fallbacks", () => {
|
||||
expect(assistantAvatarFallbackUrl("/ui")).toBe("/ui/apple-touch-icon.png");
|
||||
expect(assistantAvatarFallbackUrl("")).toBe("apple-touch-icon.png");
|
||||
expect(assistantAvatarFallbackUrl("")).toBe("/apple-touch-icon.png");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -245,12 +245,12 @@ export function resolveChatAvatarRenderUrl(
|
||||
|
||||
export function agentLogoUrl(basePath: string): string {
|
||||
const base = normalizeOptionalString(basePath)?.replace(/\/$/, "") ?? "";
|
||||
return base ? `${base}/favicon.svg` : "favicon.svg";
|
||||
return base ? `${base}/favicon.svg` : "/favicon.svg";
|
||||
}
|
||||
|
||||
export function assistantAvatarFallbackUrl(basePath: string): string {
|
||||
const base = normalizeOptionalString(basePath)?.replace(/\/$/, "") ?? "";
|
||||
return base ? `${base}/apple-touch-icon.png` : "apple-touch-icon.png";
|
||||
return base ? `${base}/apple-touch-icon.png` : "/apple-touch-icon.png";
|
||||
}
|
||||
|
||||
function isAvatarUrl(value: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user