feat(web): 全站改用越疆配色并统一模块页头

为什么:测试机工作台要长时间盯着看。原配色是深色侧栏 + 三种"主按钮"
(全局深藏青、监控页蓝、问答页黑),各模块页头字号/边距/是否装卡片各不相同;
另有一处真缺陷:全局 button:hover:not(:disabled) 特异性高于 .nav-item:hover,
悬停导航时被刷成白底,选中项文字几乎看不见。

改了什么:
- 色板改取越疆官网 dobot.cn:品牌钴蓝 #0039C8 为全站唯一强调/主操作色,
  文字与底色改为不带蓝紫偏色的中性灰(用户反馈紫色费眼);卡片细边 + 极轻投影。
- 侧栏改为明亮底,选中项浅钴蓝底 + 钴蓝字;悬停规则补 :not(:disabled) 修复白底。
  导航字号/点击区保持 16px / 44px(沿用 8d44d54 的放大决定)。
- 新增唯一一份 .page-header / .page-title / .page-subtitle;版本记录、系统设置、
  发布管理接入(版本记录页头不再装卡片),删掉各自重复的标题字号规则;
  page-shell 改为 max-width,模块自己的 1800/1500 上限终于生效。
- 版本记录、系统设置、问答同步状态里的硬编码蓝/石板灰映射回令牌;顺带修正
  6 个从未定义的变量(--border/--card/--accent/--brand 等)——它们此前只靠
  回退值或干脆不生效。

不改业务语义、权限、确认流程与接口调用。
验证:npm run typecheck、vitest 全量(110 文件 / 568 用例)通过;浏览器只读核对
导航悬停色、六个模块页头左缘/字号/字重一致。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
姚章浩
2026-11-16 17:07:44 +08:00
parent 5e850e96f5
commit 0f7b8987b4
8 changed files with 187 additions and 143 deletions
+4 -4
View File
@@ -1912,12 +1912,12 @@ export function ReleaseTargetsView(props: ViewProps) {
return (
<section className="release-targets" aria-label="发布管理">
<header className="rel-head">
<header className="rel-head page-header">
<div>
<h1>发布管理</h1>
<p>测试维护与验证,生产按知识库版本同步。</p>
<h1 className="page-title">发布管理</h1>
<p className="page-subtitle">测试维护与验证,生产按知识库版本同步。</p>
</div>
<div className="rel-head-actions">
<div className="rel-head-actions page-header-actions">
<button type="button" className="rel-secondary" onClick={() => onDrawer(true)}>
▣ 版本与快照
</button>
+2 -2
View File
@@ -201,9 +201,9 @@ export function SystemSettingsView({
}
return (
<main className="page-shell system-settings">
<header className="hero compact">
<header className="hero compact page-header">
<div>
<h1>系统设置</h1>
<h1 className="page-title">系统设置</h1>
</div>
</header>
{error ? (
+4 -4
View File
@@ -87,12 +87,12 @@ export function VersionHistoryView(props: ViewProps) {
: props.expanded
return (
<section className="version-history" aria-label="版本记录">
<header className="version-history-header">
<header className="version-history-header page-header">
<div>
<h2>版本记录</h2>
<p>查看当前构建,以及每次更新带来的变化。</p>
<h1 className="page-title">版本记录</h1>
<p className="page-subtitle">查看当前构建,以及每次更新带来的变化。</p>
</div>
<div className="version-history-actions">
<div className="version-history-actions page-header-actions">
<button type="button" onClick={props.onRefresh} disabled={props.loading}>
刷新
</button>
+1 -1
View File
@@ -1,6 +1,6 @@
.qa-mirror-sync {
padding: 12px 0;
border-bottom: 1px solid var(--border, #dce4ef);
border-bottom: 1px solid var(--border-base);
margin-bottom: 12px;
}
.qa-mirror-sync-line {
+1 -5
View File
@@ -9,14 +9,10 @@
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px 28px 40px;
padding: 22px 24px 40px;
color: var(--rel-ink);
min-width: 0;
}
.release-targets h1 {
margin: 0 0 4px;
font-size: 28px;
}
.release-targets h2 {
margin: 0;
font-size: 18px;
+131 -72
View File
@@ -1,68 +1,77 @@
/* ============================================================
知识治理平台 · 方向 A · Data-console
冷灰白底、1px 细边、零阴影、等宽数字
知识治理平台 · 工作台视觉(配色取自越疆官网 dobot.cn)
纯中性灰底与文字(不带蓝紫偏色,久看不累)、细边 + 极轻投影、等宽数字;
全站只有一个强调色:越疆品牌钴蓝 #0039C8
彩色仅用于语义(红=失败、橙=停滞、蓝=处理中、绿=完成、灰=死信)
============================================================ */
:root {
/* 基础色板(A 风格) */
--bg-page: #fafbfc;
--bg-page: #f7f8fc;
--bg-panel: #ffffff;
--bg-soft: #f8fafc;
--bg-softer: #f3f6f9;
--bg-hover: #f3f7fa;
--bg-active: #eff4fd;
--bg-soft: #f8f9fb;
--bg-softer: #f2f3f5;
--bg-hover: #f5f6f9;
--bg-active: #edf1fb;
--border-strong: #d3dce3;
--border-base: #e3e8ec;
--border-soft: #eef2f6;
--border-strong: #d9d9d9;
--border-base: #e8e8e8;
--border-soft: #efeff2;
--ink-strong: #0f1720;
--ink-base: #16324f;
--ink-mute: #57687a;
--ink-faint: #8a98a4;
--ink-strong: #1d1d1f;
--ink-base: #333336;
--ink-mute: #6e6e73;
--ink-faint: #a6a6a8;
/* 语义色 */
--c-fail: #b91c1c;
--c-fail-bg: #fdecec;
--c-fail-border: #f2baba;
--c-fail: #c0362c;
--c-fail-bg: #fef3f2;
--c-fail-border: #fecdca;
--c-warn: #d97706;
--c-warn-bg: #fef3e2;
--c-warn-border: #f3d9a8;
--c-warn: #b54708;
--c-warn-bg: #fffaeb;
--c-warn-border: #fedf89;
--c-run: #2563eb;
--c-run-bg: #eff4fd;
--c-run-border: #c7d7f2;
--c-run: #0039c8;
--c-run-bg: #edf1fb;
--c-run-border: #bccbef;
--c-done: #059669;
--c-done-bg: #eefaf4;
--c-done-border: #bfe3d4;
--c-done: #067647;
--c-done-bg: #ecfdf3;
--c-done-border: #abefc6;
--c-dead: #6b7280;
--c-dead-bg: #f3f4f6;
--c-dead: #6e6e73;
--c-dead-bg: #f2f3f5;
--c-cyan: #0891b2;
--c-cyan-bg: #ddf7fb;
--c-cyan: #0e7090;
--c-cyan-bg: #e8f7fb;
/* 深侧栏(A 风格) */
--side-bg: #0e1c2b;
--side-bg-active: #16324a;
--side-bg-hover: #152a3d;
--side-border: #1a2f44;
--side-accent: #2dd4bf;
--side-ink: #9fb6c6;
--side-ink-strong: #e8f2f8;
--side-ink-faint: #5b7789;
/* 侧栏与内容同一明度,靠细边与浅钴蓝选中态区分,长时间操作不刺眼 */
--side-bg: #ffffff;
--side-bg-active: #edf1fb;
--side-bg-hover: #f5f6f9;
--side-border: #e8e8e8;
--side-accent: #0039c8;
--side-ink: #474747;
--side-ink-strong: #1d1d1f;
--side-ink-faint: #a6a6a8;
/* 全站唯一的主操作色;以前主按钮借用深色侧栏底色,各模块又各自改成蓝/黑,出现三种"主按钮" */
--c-primary: #0039c8;
--c-primary-hover: #002fa5;
--c-focus-ring: 0 0 0 3px rgb(0 57 200 / 15%);
/* 卡片只用极轻投影托起,层级靠留白而不是色块 */
--shadow-card: 0 1px 2px rgb(0 0 0 / 4%), 0 1px 3px rgb(0 0 0 / 3%);
--shadow-float: 0 12px 32px rgb(0 0 0 / 10%), 0 2px 6px rgb(0 0 0 / 5%);
/* 字体 */
--font-base: Inter, 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
--font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
/* 圆角(A 风格:小圆角) */
--r-sm: 3px;
--r-md: 4px;
--r-lg: 6px;
--r-sm: 4px;
--r-md: 6px;
--r-lg: 10px;
}
* {
@@ -80,7 +89,8 @@ body {
background: var(--bg-page);
color: var(--ink-strong);
font-size: 13px;
line-height: 1.5;
line-height: 1.55;
letter-spacing: 0.005em;
-webkit-font-smoothing: antialiased;
font-synthesis: none;
text-rendering: optimizeLegibility;
@@ -94,14 +104,14 @@ body {
button {
border: 1px solid var(--border-strong);
border-radius: var(--r-md);
padding: 5px 11px;
color: var(--ink-strong);
padding: 5px 12px;
color: var(--ink-base);
background: var(--bg-panel);
font: inherit;
font-size: 12px;
font-weight: 500;
cursor: pointer;
box-shadow: none;
box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
transition:
background 120ms ease,
border-color 120ms ease,
@@ -110,7 +120,13 @@ button {
button:hover:not(:disabled) {
background: var(--bg-soft);
border-color: #94a3b8;
border-color: var(--border-strong);
color: var(--ink-strong);
}
button:focus-visible {
outline: none;
box-shadow: var(--c-focus-ring);
}
button:disabled {
@@ -121,16 +137,17 @@ button:disabled {
button.primary,
button[type='submit'],
.primary-link {
background: var(--side-bg);
border-color: var(--side-bg);
background: var(--c-primary);
border-color: var(--c-primary);
color: #fff;
font-weight: 600;
}
button.primary:hover:not(:disabled),
button[type='submit']:hover:not(:disabled),
.primary-link:hover {
background: #1a2f44;
border-color: #1a2f44;
background: var(--c-primary-hover);
border-color: var(--c-primary-hover);
}
/* ========== 代码与等宽 ========== */
@@ -165,7 +182,7 @@ code {
padding: 18px 0;
color: var(--side-ink);
background: var(--side-bg);
border-right: 1px solid #0a141f;
border-right: 1px solid var(--side-border);
box-shadow: none;
}
@@ -185,7 +202,7 @@ code {
flex: none;
place-items: center;
border-radius: var(--r-md);
color: #04211d;
color: #fff;
background: var(--side-accent);
font-size: 13px;
font-weight: 700;
@@ -224,7 +241,7 @@ code {
border: 1px solid transparent;
border-radius: var(--r-md);
padding: 9px 10px;
color: #8aa2b3;
color: var(--side-ink);
background: transparent;
box-shadow: none;
font-weight: 500;
@@ -236,17 +253,20 @@ code {
color 120ms ease;
}
.nav-item:hover {
color: #d9e8f1;
/* 必须带 :not(:disabled):全局 button:hover:not(:disabled) 特异性更高,
少了它悬停会被刷成白底,选中项文字几乎看不见 */
.nav-item:hover:not(:disabled) {
color: var(--side-ink-strong);
background: var(--side-bg-hover);
border-color: transparent;
}
.nav-item.active {
.nav-item.active,
.nav-item.active:hover:not(:disabled) {
border-color: transparent;
color: #fff;
color: var(--side-accent);
font-weight: 600;
background: var(--side-bg-active);
border-left: 2px solid var(--side-accent);
padding-left: 8px;
}
.nav-icon {
@@ -255,10 +275,14 @@ code {
height: 24px;
flex: none;
place-items: center;
color: var(--side-accent);
color: var(--ink-faint);
font-size: 20px;
}
.nav-item.active .nav-icon {
color: var(--side-accent);
}
.sidebar-footer {
display: flex;
align-items: center;
@@ -266,7 +290,7 @@ code {
margin-top: auto;
padding: 14px 18px 0;
border-top: 1px solid var(--side-border);
color: #46647a;
color: var(--side-ink-faint);
font-size: 11px;
}
@@ -388,11 +412,46 @@ code {
/* ========== 页面外壳 ========== */
.page-shell {
width: min(1240px, calc(100% - 48px));
/* 模块自己的 max-width(目录/监控 1800、设置 1500)此前被 min() 宽度压成 1240,宽屏上与发布/问答页不齐 */
width: calc(100% - 48px);
max-width: 1240px;
margin: 0 auto;
padding: 22px 0 40px;
}
/* 六个模块共用的页头:标题、说明与右侧操作的字号和位置只在这里定义一份 */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
margin: 0 0 20px;
}
.page-header .page-title {
margin: 0 0 4px;
color: var(--ink-strong);
font-size: 22px;
font-weight: 600;
letter-spacing: -0.02em;
line-height: 1.3;
}
.page-header .page-subtitle {
margin: 0;
color: var(--ink-mute);
font-size: 13px;
}
/* 这三个页面的外层是带 gap 的纵向 flex,页头间距已由 gap 提供 */
.page-header:where(.rel-head, .version-history-header, .qa-ops-header) {
margin-bottom: 4px;
}
.page-header-actions {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.hero {
display: flex;
align-items: flex-start;
@@ -490,7 +549,7 @@ h1 {
border: 1px solid var(--border-base);
border-radius: var(--r-lg);
background: var(--bg-panel);
box-shadow: none;
box-shadow: var(--shadow-card);
}
.panel-heading {
@@ -1141,7 +1200,7 @@ tbody tr:hover {
border-radius: var(--r-md);
padding: 5px 11px;
color: #fff;
background: var(--side-bg);
background: var(--c-primary);
box-shadow: none;
font-size: 12px;
font-weight: 600;
@@ -2113,18 +2172,18 @@ tbody tr:hover {
right: 6px;
transform: translateY(-50%);
padding: 2px 8px;
border: 1px solid var(--line-base, #d7dbe0);
border: 1px solid var(--border-strong);
border-radius: 6px;
background: #fff;
color: var(--ink-base, #333);
color: var(--ink-base);
font-size: 12px;
font-weight: 600;
line-height: 20px;
cursor: pointer;
}
.password-toggle:hover {
border-color: var(--c-run, #2f6feb);
color: var(--c-run, #2f6feb);
border-color: var(--c-run);
color: var(--c-run);
}
.login-error {
margin: 0;
@@ -2167,8 +2226,8 @@ tbody tr:hover {
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--side-bg);
color: var(--side-accent);
background: var(--c-primary);
color: #fff;
display: grid;
place-items: center;
font-size: 13px;
+14 -14
View File
@@ -281,7 +281,7 @@
font-size: 9px;
}
.settings-source-row select {
border: 1px solid #c9d9e4;
border: 1px solid var(--border-strong);
border-radius: 7px;
padding: 7px;
background: var(--bg-panel);
@@ -321,7 +321,7 @@
min-width: 64px;
}
.settings-source-row .source-more:focus-visible {
outline: 2px solid #2978bd;
outline: 2px solid var(--c-run);
outline-offset: 3px;
}
.dependency-grid {
@@ -657,8 +657,8 @@ button.link {
.dingtalk-qr-loading span {
width: 42px;
height: 42px;
border: 4px solid #dbe4ee;
border-top-color: var(--brand);
border: 4px solid var(--border-base);
border-top-color: var(--c-run);
border-radius: 50%;
animation: dingtalk-qr-spin 0.8s linear infinite;
}
@@ -707,8 +707,8 @@ button.link {
.filename-filter-editor code {
padding: 2px 7px;
border-radius: 999px;
background: #eaf2ff;
color: #2456a6;
background: var(--c-run-bg);
color: var(--c-run);
font-family: inherit;
font-size: 11px;
}
@@ -791,9 +791,9 @@ button.link {
gap: 10px;
padding: 12px;
margin-bottom: 14px;
border: 1px solid var(--border, #e3e8ec);
border: 1px solid var(--border-base);
border-radius: 10px;
background: var(--card, #fff);
background: var(--bg-panel);
}
.dingtalk-discovery-heading {
display: flex;
@@ -807,7 +807,7 @@ button.link {
}
.dingtalk-discovery-heading small {
display: block;
color: var(--muted-foreground, #5b6773);
color: var(--ink-mute);
font-size: 12px;
}
.dingtalk-discovery-groups {
@@ -838,7 +838,7 @@ button.link {
border-radius: 6px;
}
.discovery-row:hover {
background: var(--accent, #f2f5f8);
background: var(--bg-soft);
}
.discovery-row label {
display: flex;
@@ -848,7 +848,7 @@ button.link {
}
.discovery-row.registered label {
cursor: default;
color: var(--muted-foreground, #5b6773);
color: var(--ink-mute);
}
.discovery-row strong {
font-size: 13px;
@@ -857,7 +857,7 @@ button.link {
.discovery-row small {
display: block;
font-size: 11px;
color: var(--muted-foreground, #5b6773);
color: var(--ink-mute);
}
.dingtalk-discovery-actions {
display: flex;
@@ -865,7 +865,7 @@ button.link {
gap: 10px;
}
.dingtalk-discovery-actions small {
color: var(--muted-foreground, #5b6773);
color: var(--ink-mute);
font-size: 12px;
}
@@ -878,7 +878,7 @@ button.link {
margin: 0 0 0.75rem;
}
.settings-legacy-toggle small {
color: #5a6572;
color: var(--ink-mute);
font-size: 0.8rem;
line-height: 1.5;
}
+30 -41
View File
@@ -4,28 +4,17 @@
flex-direction: column;
gap: 18px;
min-width: 0;
padding: 24px;
padding: 22px 24px 40px;
color: var(--ink-base);
}
.version-history-header,
.version-history-current-card,
.version-history-records {
background: var(--bg-panel, #fff);
border: 1px solid var(--border-base, #e2e8f0);
background: var(--bg-panel);
border: 1px solid var(--border-base);
border-radius: 10px;
padding: 20px;
min-width: 0;
}
.version-history-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.version-history h2 {
margin: 0 0 4px;
font-size: 22px;
}
.version-history h3 {
margin: 0;
font-size: 18px;
@@ -33,7 +22,7 @@
.version-history-header p,
.version-history-records-heading p {
margin: 0;
color: var(--ink-mute, #64748b);
color: var(--ink-mute);
font-size: 13px;
}
.version-history-actions {
@@ -48,19 +37,19 @@
display: grid;
grid-template-columns: 0.8fr 0.8fr 2fr 1.3fr;
margin: 16px 0 0;
border: 1px solid var(--border-base, #e2e8f0);
background: var(--bg-page, #f8fafc);
border: 1px solid var(--border-base);
background: var(--bg-page);
}
.version-history-build-grid > div {
padding: 12px 14px;
min-width: 0;
border-right: 1px solid var(--border-base, #e2e8f0);
border-right: 1px solid var(--border-base);
}
.version-history-build-grid > div:last-child {
border-right: 0;
}
.version-history dt {
color: var(--ink-mute, #64748b);
color: var(--ink-mute);
font-size: 12px;
margin-bottom: 5px;
}
@@ -76,7 +65,7 @@
}
.version-history-running-state {
margin: 12px 0 0;
color: var(--ink-mute, #64748b);
color: var(--ink-mute);
font-size: 12px;
overflow-wrap: anywhere;
}
@@ -93,13 +82,13 @@
flex-wrap: wrap;
gap: 8px;
margin: 10px 0 14px;
color: var(--ink-mute, #64748b);
color: var(--ink-mute);
font-size: 12px;
}
.version-history-notice {
padding: 10px 14px;
border-radius: 6px;
background: var(--c-run-bg, #eff6ff);
background: var(--c-run-bg);
font-size: 13px;
}
.version-history-filters {
@@ -116,9 +105,9 @@
}
.version-history-filters button.active {
font-weight: 600;
color: var(--c-run, #2563eb);
background: var(--c-run-bg, #eff6ff);
border-color: var(--c-run-border, #bfdbfe);
color: var(--c-run);
background: var(--c-run-bg);
border-color: var(--c-run-border);
}
.version-history-timeline {
list-style: none;
@@ -130,9 +119,9 @@
min-width: 0;
}
.version-history-entry {
border: 1px solid var(--border-base, #e2e8f0);
border: 1px solid var(--border-base);
border-radius: 8px;
background: var(--bg-panel, #fff);
background: var(--bg-panel);
min-width: 0;
overflow: hidden;
}
@@ -155,14 +144,14 @@
font-weight: 400;
}
.version-history-entry-head:hover {
background: var(--bg-hover, #f8fafc);
background: var(--bg-hover);
}
.version-history-entry-head[aria-expanded='true'] {
background: var(--bg-page, #f8fafc);
border-bottom: 1px solid var(--border-base, #e2e8f0);
background: var(--bg-page);
border-bottom: 1px solid var(--border-base);
}
.version-history-entry-head:focus-visible {
outline: 2px solid var(--c-run, #2563eb);
outline: 2px solid var(--c-run);
outline-offset: -3px;
}
.version-history-version {
@@ -170,14 +159,14 @@
flex-shrink: 0;
font-size: 13px;
padding: 3px 8px;
border: 1px solid var(--border-strong, #cbd5e1);
border: 1px solid var(--border-strong);
border-radius: 5px;
font-weight: 500;
color: var(--ink-mute);
}
.version-history-version.development {
border-color: #b4d1f5;
color: #2465aa;
border-color: var(--c-run-border);
color: var(--c-run);
}
.version-history-version.release {
border-color: #b1d7bd;
@@ -199,8 +188,8 @@
}
.version-history-badge.pending,
.version-history-badge.development {
color: #2465aa;
background: #eff6ff;
color: var(--c-run);
background: var(--c-run-bg);
}
.version-history-badge.release {
color: #24814e;
@@ -217,7 +206,7 @@
}
.version-history-entry-head > .version-history-sha,
.version-history-entry-head time {
color: var(--ink-faint, #7c8c9f);
color: var(--ink-faint);
flex-shrink: 0;
font-size: 12px;
}
@@ -231,7 +220,7 @@
.version-history-toggle {
flex-shrink: 0;
font-size: 13px;
color: var(--c-run, #2563eb);
color: var(--c-run);
}
.version-history-detail {
padding: 16px;
@@ -260,7 +249,7 @@
font-size: 12px;
line-height: 1.6;
background: #eef2f6;
color: #536275;
color: var(--ink-mute);
}
.version-history-change-tag.added {
background: #eaf7ef;
@@ -271,8 +260,8 @@
color: #986000;
}
.version-history-change-tag.changed {
background: #eff6ff;
color: #2465aa;
background: var(--c-run-bg);
color: var(--c-run);
}
.version-history-change-tag.security {
background: #fff1ef;