fix: 组件配色全面对齐 Ant Design 5 token + 修复 iframe 内页签初始激活(issue #131)

组件审查结论:全站组件为自绘 HTML+CSS 仿 AntD(纯静态无组件库),
pro.css 已统一设计 token,但各页 CSS/JS 残留一批旧配色硬编码,
pro.css 覆盖不到,本次全部清理:

- 旧 iOS 红 #ff3b30 → --ant-error #ff4d4f(告警 P0/严重度/DLP 条/
  工艺 alarm 态/diff 删除行)
- 旧橙 #f5a623 → --ant-warning #faad14(P1 告警/warning 态/暂存徽章)
- 旧 iOS 绿 #2ecc71 → --ant-success #52c41a(running 态/prod 徽章/
  索引完成/路由本地标签/权限矩阵)
- 杂色蓝统一 → --ant-primary #1677ff:发送键 #0ea5e9、P2 告警
  #3aa0ff、编排画布残留青 rgba(24,211,200)、旧气泡 #1d4ed8
- 主色按钮上的深色文字 #04202a → #fff(对比度修正)
- 灰 #64748b → --ant-text-tertiary rgba(0,0,0,0.45)
- 各页 CSS :root 深色默认变量值(#0b1220/#13203a/#18d3c8 等死值)
  对齐为 AntD 亮色默认值,修正"深色主题"过时注释
- 删除已无任何引用的旧深色登录页样式 auth/auth.css

顺带修复实测发现的 bug:SPA 外壳内直达 admin/studio 子页时页签
不切换——studio.js/admin.js 的 Tab 事件在异步 boot(user) 中绑定,
bindPageTabs 的 window load 初始激活可能早于绑定完成,改为带重试
的激活(直到 Tab 点亮,最多 10s)。实测 #/admin/#alerts 直达后
page-alerts 正确激活。
This commit is contained in:
2026-08-06 08:20:17 +08:00
parent cfa976cac3
commit 8b68d015c2
12 changed files with 98 additions and 150 deletions
+11 -9
View File
@@ -1,7 +1,9 @@
/* iAOP 管理控制台样式(issue #135)。深色主题,与 cockpit/studio 一致。 */
/* iAOP 管理控制台样式(issue #135)。Ant Design 5 token 调色(2026-08 全站 AntD Pro 重构)。 */
:root {
--bg: #0b1220; --surface: #13203a; --fg: #e6edf6; --muted: #8aa0bd;
--accent: #18d3c8; --warn: #f5a623; --line: rgba(255,255,255,.06);
/* 默认值 = Ant Design 5 亮色 token(pro.css 在后加载再次确认) */
--bg: #f0f2f5; --surface: #ffffff; --fg: rgba(0,0,0,0.88);
--muted: rgba(0,0,0,0.45);
--accent: #1677ff; --warn: #faad14; --line: rgba(5,5,5,0.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
@@ -13,7 +15,7 @@ h1 { font-size: 18px; color: var(--accent); margin: 0; }
h1 .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
#topbar-right { display: flex; gap: 14px; align-items: center; font-size: 13px; }
#topbar-right a { color: var(--accent); text-decoration: none; }
.hint { font-size: 11px; color: #64748b; }
.hint { font-size: 11px; color: rgba(0,0,0,0.45); }
#tabs { display: flex; gap: 4px; padding: 8px 16px 0; }
.tab { padding: 8px 18px; border: 1px solid var(--line); border-bottom: none;
@@ -32,7 +34,7 @@ select, input { padding: 7px 10px; border-radius: 6px; font-size: 13px;
border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
button { padding: 6px 14px; border: none; border-radius: 6px; cursor: pointer;
background: #1e293b; color: var(--fg); font-size: 12px; }
button.primary { background: var(--accent); color: #04202a; }
button.primary { background: var(--accent); color: #ffffff; }
button:disabled { opacity: .4; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
@@ -41,14 +43,14 @@ th { color: var(--muted); font-weight: 400; }
/* 模型阶段徽标 */
.stage { padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.stage-dev { background: rgba(138,160,189,.15); color: var(--muted); }
.stage-staging { background: rgba(245,166,35,.15); color: var(--warn); }
.stage-prod { background: rgba(46,204,113,.15); color: #2ecc71; }
.stage-dev { background: rgba(0,0,0,0.06); color: var(--muted); }
.stage-staging { background: rgba(250,173,20,.15); color: var(--warn); }
.stage-prod { background: rgba(82,196,26,.15); color: #52c41a; }
/* 知识库 */
.detail { margin-top: 12px; background: var(--bg); border-radius: 6px; padding: 10px;
font-size: 12px; color: var(--muted); max-height: 260px; overflow-y: auto; }
.idx-ok { color: #2ecc71; }
.idx-ok { color: #52c41a; }
.idx-pending { color: var(--warn); }
/* 告警 */