Archived
基线:鉴权会话+工作组+工作台三区修复+编排工作区+产品设计文档
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* 网页标签的名与章 —— 两台面各有一套,多标签并开时一眼可辨。
|
||||
*
|
||||
* 章随台面的**皮肤基调**走,不另造视觉:
|
||||
* 工作台 = 品牌蓝渐变圆角方 + 白色机器人(与左轨品牌章、登录页方章同源);
|
||||
* 治理中心 = 深色底(治理台顶栏的那种深)+ 盾形勾(管的是规则与放行)。
|
||||
* SVG 以 data: URI 内联 —— 不添静态资产,构建零配置。
|
||||
*/
|
||||
|
||||
const DESK_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#3d7bff"/><stop offset="1" stop-color="#2454d6"/>
|
||||
</linearGradient></defs>
|
||||
<rect width="32" height="32" rx="8" fill="url(#g)"/>
|
||||
<g transform="translate(4,5)">
|
||||
<circle cx="12" cy="1.5" r="1.3" fill="#fff"/>
|
||||
<rect x="11.4" y="2.3" width="1.2" height="2.2" rx="0.6" fill="#fff"/>
|
||||
<rect x="3.6" y="4.6" width="16.8" height="13" rx="4.6" fill="#fff"/>
|
||||
<rect x="1.2" y="8.8" width="2.2" height="4.8" rx="1.1" fill="#fff"/>
|
||||
<rect x="20.6" y="8.8" width="2.2" height="4.8" rx="1.1" fill="#fff"/>
|
||||
<circle cx="9.2" cy="10.4" r="1.9" fill="#2454d6"/>
|
||||
<circle cx="14.8" cy="10.4" r="1.9" fill="#2454d6"/>
|
||||
<path d="M9.3 13.8c.7.9 1.7 1.35 2.7 1.35s2-.45 2.7-1.35" stroke="#2454d6" stroke-width="1.3" fill="none" stroke-linecap="round" opacity="0.55"/>
|
||||
</g>
|
||||
</svg>`;
|
||||
|
||||
const GOV_ICON = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<rect width="32" height="32" rx="8" fill="#141b2e"/>
|
||||
<g transform="translate(4,4)" fill="none" stroke="#8fb0ff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>
|
||||
<path d="m9 12 2 2 4-4" stroke="#fff"/>
|
||||
</g>
|
||||
</svg>`;
|
||||
|
||||
/** 进哪台就挂哪套 —— 登录页也按 URL 归台,标签在登录前就叫对名字 */
|
||||
export function applyTabIdentity(isGovernance: boolean): void {
|
||||
document.title = isGovernance ? 'JCAI 治理中心' : 'JCAI 工作台';
|
||||
|
||||
let link = document.querySelector<HTMLLinkElement>('link[rel="icon"]');
|
||||
if (link === null) {
|
||||
link = document.createElement('link');
|
||||
link.rel = 'icon';
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
link.type = 'image/svg+xml';
|
||||
link.href = 'data:image/svg+xml;utf8,' + encodeURIComponent(isGovernance ? GOV_ICON : DESK_ICON);
|
||||
}
|
||||
Reference in New Issue
Block a user