同步:完善质量分析工作台并更新主题字体
同步已上线的智能分析执行协议、来源查询、图表报告与管理页面配套代码。 补齐数据库迁移、运行依赖和回归测试,保留原有指标计算口径。 统一午夜黑及其他主题的控件细节、中文和业务数字字体。 排除本地业务数据、凭据、预览、发布与验收产物。 验证:生产构建通过,320项前端回归通过;本轮仅同步Git,不再次部署。
This commit is contained in:
+35
-23
@@ -7,6 +7,7 @@ import { getStoredWorkspaceThemeId, getWorkspaceTheme, workspaceThemeStorageKey,
|
||||
import './styles.css';
|
||||
import './dark-theme.css';
|
||||
import './quality-table.css';
|
||||
import './workspace-finish.css';
|
||||
|
||||
function QualityCenterApp() {
|
||||
const [themeId, setThemeId] = useState<WorkspaceThemeId>(getStoredWorkspaceThemeId);
|
||||
@@ -16,20 +17,22 @@ function QualityCenterApp() {
|
||||
useLayoutEffect(() => {
|
||||
const root = document.documentElement;
|
||||
root.dataset.workspaceTheme = appearance.id;
|
||||
root.style.setProperty('--ink', dark ? '#EAF0FA' : '#111111');
|
||||
root.style.setProperty('--muted-ink', dark ? '#ADBDD1' : '#63758b');
|
||||
root.style.setProperty('--ink', appearance.ink);
|
||||
root.style.setProperty('--muted-ink', appearance.secondaryInk);
|
||||
root.style.setProperty('--blue', appearance.primary);
|
||||
root.style.setProperty('--blue-dark', dark ? '#A9BDFF' : appearance.primary);
|
||||
root.style.setProperty('--blue-dark', appearance.primary);
|
||||
root.style.setProperty('--blue-soft', appearance.soft);
|
||||
root.style.setProperty('--blue-muted', appearance.muted);
|
||||
root.style.setProperty('--background', appearance.background);
|
||||
root.style.setProperty('--hover', appearance.hover);
|
||||
root.style.setProperty('--metric-grid', appearance.metricGrid);
|
||||
root.style.setProperty('--metric-grid-head', appearance.metricGridHead);
|
||||
root.style.setProperty('--sidebar-surface', dark ? '#111B2A' : 'color-mix(in srgb, var(--background) 48%, white)');
|
||||
root.style.setProperty('--surface', dark ? '#172234' : '#ffffff');
|
||||
root.style.setProperty('--line', dark ? '#35445A' : '#dfe5ef');
|
||||
root.style.setProperty('--teal', dark ? '#54D5BF' : '#008f7d');
|
||||
root.style.setProperty('--sidebar-surface', dark ? '#111829' : 'color-mix(in srgb, var(--background) 48%, var(--surface))');
|
||||
root.style.setProperty('--surface', appearance.surface);
|
||||
root.style.setProperty('--surface-subtle', appearance.subtle);
|
||||
root.style.setProperty('--surface-elevated', appearance.elevated);
|
||||
root.style.setProperty('--line', appearance.line);
|
||||
root.style.setProperty('--teal', appearance.teal);
|
||||
try { window.localStorage.setItem(workspaceThemeStorageKey, appearance.id); } catch { /* local preference is optional */ }
|
||||
}, [appearance]);
|
||||
|
||||
@@ -41,28 +44,37 @@ function QualityCenterApp() {
|
||||
token: {
|
||||
colorPrimary: appearance.primary,
|
||||
colorInfo: appearance.primary,
|
||||
colorBgBase: dark ? '#101928' : '#ffffff',
|
||||
colorBgContainer: dark ? '#172234' : '#ffffff',
|
||||
colorBgBase: appearance.background,
|
||||
colorBgLayout: appearance.background,
|
||||
colorBgContainer: appearance.surface,
|
||||
// Ant Design 6 renders modal panels on `.ant-modal-container` and
|
||||
// derives their background from this token. Keep it explicit in
|
||||
// light themes so overlays never inherit a transparent default.
|
||||
colorBgElevated: dark ? '#1A2638' : '#ffffff',
|
||||
colorText: dark ? '#EAF0FA' : '#111111',
|
||||
colorTextSecondary: dark ? '#ADBDD1' : '#111111',
|
||||
colorTextPlaceholder: dark ? '#98ABC5' : undefined,
|
||||
colorBorder: dark ? '#35445A' : '#dfe5ef',
|
||||
colorBorderSecondary: dark ? '#35445A' : undefined,
|
||||
borderRadius: 0,
|
||||
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif',
|
||||
colorBgElevated: appearance.elevated,
|
||||
colorText: appearance.ink,
|
||||
colorTextSecondary: appearance.secondaryInk,
|
||||
colorTextPlaceholder: appearance.placeholder,
|
||||
colorBorder: appearance.line,
|
||||
colorBorderSecondary: appearance.line,
|
||||
borderRadius: 4,
|
||||
fontFamily: '"PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
|
||||
controlHeight: 32,
|
||||
fontSize: 14,
|
||||
fontSize: 13,
|
||||
fontSizeSM: 12,
|
||||
fontSizeLG: 14,
|
||||
},
|
||||
components: {
|
||||
Button: { borderRadius: 0 },
|
||||
Input: { borderRadius: 0 },
|
||||
Select: { borderRadius: 0 },
|
||||
Table: { headerBg: dark ? '#202D40' : '#f6f8fd', rowHoverBg: appearance.hover },
|
||||
Modal: { borderRadiusLG: 0 },
|
||||
Button: {
|
||||
borderRadius: 4, contentFontSize: 12, contentFontSizeSM: 12, contentFontSizeLG: 13,
|
||||
primaryColor: dark ? '#080F1E' : '#FFFFFF',
|
||||
...(appearance.id === 'bright' ? { colorPrimary: '#0078D4', colorPrimaryHover: '#006ABD', colorPrimaryActive: '#005EA8' } : {}),
|
||||
},
|
||||
Input: { borderRadius: 4, inputFontSize: 12, inputFontSizeSM: 12, inputFontSizeLG: 13 },
|
||||
Select: { borderRadius: 4, fontSize: 12 },
|
||||
Form: { labelFontSize: 12 },
|
||||
Segmented: { fontSize: 12 },
|
||||
Table: { cellFontSize: 12, cellFontSizeMD: 12, cellFontSizeSM: 12, headerBg: appearance.subtle, rowHoverBg: appearance.hover },
|
||||
Modal: { borderRadiusLG: 6 },
|
||||
Drawer: { borderRadiusLG: 0 },
|
||||
},
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user