From a0bfb70b34263dbee64a1212d88f28fbf17019cf Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Jun 2026 15:25:52 +0800 Subject: [PATCH] polish premium webui typography and logs --- webui/css/premium.css | 65 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/webui/css/premium.css b/webui/css/premium.css index aae258f..dff9703 100644 --- a/webui/css/premium.css +++ b/webui/css/premium.css @@ -53,8 +53,9 @@ --motion-fast: 120ms cubic-bezier(0.16, 1, 0.3, 1); --motion: 180ms cubic-bezier(0.16, 1, 0.3, 1); --motion-slow: 280ms cubic-bezier(0.16, 1, 0.3, 1); - --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif; + --font-ui: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + --font-log: var(--font-ui); color-scheme: light; } @@ -125,7 +126,6 @@ body { } .mono, -.log, .appFooter, .btn[data-kbd]::after, .premiumDeviceRow em { @@ -543,11 +543,14 @@ body { .panels { width: 100%; max-width: none; + min-width: 0; } .panel, .card[data-panel] { width: 100%; + min-width: 0; + max-width: 100%; padding: 20px 22px; border: 1px solid var(--border); border-radius: 8px; @@ -581,6 +584,7 @@ body { color: var(--secondary); border-bottom: 1px solid var(--border); background: transparent; + font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; @@ -743,13 +747,21 @@ body { } .logSection { + min-width: 0; + max-width: 100%; + inline-size: 100%; + max-inline-size: 100%; + contain: inline-size; border-color: var(--border); border-radius: 8px; background: var(--surface); + overflow: hidden; box-shadow: none; } .logHeader { + min-width: 0; + max-width: 100%; align-items: center; border-bottom-color: var(--border); background: var(--surface-soft); @@ -765,9 +777,12 @@ body { color: var(--muted); border-color: var(--border); background: var(--surface); + font-family: var(--font-ui); } .logHeaderActions { + min-width: 0; + max-width: 100%; align-items: center; gap: 8px; } @@ -777,10 +792,18 @@ body { } .logHeaderActions .logSearchBox { + min-width: 0; + max-width: 100%; flex: 1 1 280px; } .log { + display: block; + width: 100%; + min-width: 0; + max-width: 100%; + inline-size: 100%; + max-inline-size: 100%; min-height: clamp(300px, 42vh, 520px); max-height: clamp(300px, 42vh, 520px); border-top-color: var(--border); @@ -789,10 +812,14 @@ body { linear-gradient(180deg, rgba(15, 159, 142, 0.04), transparent 44px), repeating-linear-gradient(0deg, rgba(20, 33, 29, 0.045) 0 1px, transparent 1px 25px), #f8fbfa; + font-family: var(--font-log); font-size: 13px; + font-variant-numeric: tabular-nums; line-height: 1.65; - overflow-wrap: normal; - white-space: pre; + overflow: auto; + overflow-wrap: anywhere; + white-space: pre-wrap; + word-break: break-word; tab-size: 2; text-shadow: none; } @@ -819,6 +846,18 @@ body { max-height: clamp(470px, 60vh, 760px); } +.panel.cardLog { + min-width: 0; + max-width: 100%; + contain: inline-size; +} + +.chartBlock svg text, +.premiumChart svg text, +.premiumDashboard svg text { + font-family: var(--font-ui) !important; +} + .logError { color: var(--danger); } .logWarn { color: var(--warning); } .logSuccess { color: var(--success); } @@ -1760,9 +1799,12 @@ body { :root:not([data-premium-panel="device"]) .panel, :root:not([data-premium-panel="device"]) .card[data-panel] { + min-width: 0; + max-width: 100%; padding: 0; border: 0; background: transparent; + overflow: hidden; } :root:not([data-premium-panel="device"]) .panels { @@ -1773,6 +1815,7 @@ body { :root:not([data-premium-panel="device"]) .panel.active { display: block; + width: 100%; } :root:not([data-premium-panel="device"]) .cardTitle { @@ -1785,6 +1828,10 @@ body { } :root:not([data-premium-panel="device"]) .logSection { + width: 100%; + min-width: 0; + max-width: 100%; + contain: inline-size; border: 1px solid #e3e9f1; border-radius: 8px; background: #f8fbfa; @@ -1845,8 +1892,14 @@ body { } :root:not([data-premium-panel="device"]) .panel.cardLog .log { + width: 100%; + min-width: 0; + max-width: 100%; min-height: 520px; max-height: 520px; + white-space: pre-wrap; + overflow-wrap: anywhere; + word-break: break-word; } .appFooter { @@ -2401,7 +2454,9 @@ body { min-height: clamp(320px, 52vh, 560px); max-height: clamp(320px, 52vh, 560px); font-size: 12px; - white-space: pre; + white-space: pre-wrap; + overflow-wrap: anywhere; + word-break: break-word; } .toastContainer {