From 6d82a66d68c6523850e1f03cd0bbadb71eec91b2 Mon Sep 17 00:00:00 2001 From: lingniu Date: Thu, 16 Jul 2026 11:44:08 +0800 Subject: [PATCH] style(platform): unify workspace typography scale --- .../apps/web/src/v2/styles/v2.css | 220 ++++++++++++++++++ vehicle-data-platform/apps/web/vite.config.ts | 6 +- 2 files changed, 223 insertions(+), 3 deletions(-) diff --git a/vehicle-data-platform/apps/web/src/v2/styles/v2.css b/vehicle-data-platform/apps/web/src/v2/styles/v2.css index a0839544..1bb325ba 100644 --- a/vehicle-data-platform/apps/web/src/v2/styles/v2.css +++ b/vehicle-data-platform/apps/web/src/v2/styles/v2.css @@ -1527,3 +1527,223 @@ button, a { -webkit-tap-highlight-color: transparent; } .v2-track-playback-dock { min-height: 118px; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 9px; }.v2-track-dock-summary, .v2-track-dock-metrics { display: none; }.v2-track-dock-progress { align-self: center; }.v2-track-dock-controls { align-self: center; gap: 4px; }.v2-track-dock-controls > button { width: 34px; height: 34px; }.v2-track-dock-controls > button.is-primary { width: 42px; height: 42px; }.v2-track-dock-controls > button:first-child, .v2-track-dock-controls > button:nth-child(3), .v2-track-dock-controls > button:last-child { display: none; }.v2-track-dock-controls label { height: 34px; padding: 0 6px; }.v2-track-dock-controls label span { display: none; } .v2-track-dock-progress > div span { display: none; } } + +/* Shared workspace scale — aligns data pages with the monitor command center. */ +:is(.v2-vehicle-search-page, .v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) { + --v2-workspace-title: 22px; + --v2-workspace-body: 13px; + --v2-workspace-control: 12px; + --v2-workspace-meta: 11px; + --v2-workspace-row: 48px; + font-size: var(--v2-workspace-body); +} + +:is(.v2-vehicle-search-page, .v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) + :where(button, input, select, textarea) { + font-size: var(--v2-workspace-control); +} + +:is(.v2-vehicle-search-page, .v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) + :where(p, li, dt, dd, td) { + font-size: var(--v2-workspace-control); + line-height: 1.5; +} + +:is(.v2-vehicle-search-page, .v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) + :where(small, time, code) { + font-size: var(--v2-workspace-meta); + line-height: 1.45; +} + +:is(.v2-vehicle-record-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) :where(h2) { + font-size: var(--v2-workspace-title); + line-height: 1.25; + letter-spacing: -.03em; +} + +:is(.v2-vehicle-record-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) :where(h3) { + font-size: 14px; + line-height: 1.35; +} + +:is(.v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) + :where(table th) { + font-size: var(--v2-workspace-meta); + line-height: 1.35; +} + +/* Vehicle lookup and detail. */ +.v2-vehicle-search-card { width: min(620px, 100%); padding: 38px 42px; } +.v2-vehicle-search-card h2, .v2-not-found h2 { font-size: 24px; } +.v2-vehicle-search-card > p, .v2-not-found p { font-size: 13px; } +.v2-vehicle-search-card input { height: 42px; font-size: 14px; } +.v2-vehicle-record-page { gap: 14px; padding: 16px 20px 20px; } +.v2-vehicle-record-page header strong, .v2-vehicle-record-page article strong { font-size: 13px; } +.v2-vehicle-record-page .v2-plate { min-height: 40px; font-size: 17px; } +.v2-vehicle-record-page .v2-live-grid strong { font-size: 18px; } +.v2-vehicle-record-page .v2-record-list > div, +.v2-vehicle-record-page .v2-telemetry-list > div { min-height: 42px; font-size: 12px; } +.v2-vehicle-record-page .v2-telemetry-list strong { font-size: 12px; } +.v2-vehicle-record-page .v2-identity-actions a { height: 38px; font-size: 12px; } + +/* Track replay keeps the map-first layout while making command chrome readable. */ +.v2-track-page { grid-template-columns: 340px minmax(0, 1fr); } +.v2-track-query { padding: 16px; } +.v2-track-query > header { height: 38px; margin-bottom: 12px; } +.v2-track-query > header strong { font-size: 16px; } +.v2-track-query > header span, +.v2-track-query > label, +.v2-track-date-grid label { font-size: 11px; } +.v2-track-vehicle-picker { height: 42px; } +.v2-track-vehicle-picker input { height: 38px; font-size: 13px; } +.v2-track-date-grid input, .v2-track-query select { height: 39px; font-size: 12px; } +.v2-track-presets button { height: 30px; font-size: 11px; } +.v2-track-query-button { height: 40px; font-size: 13px; } +.v2-track-page header strong, +.v2-track-stop-list button strong, +.v2-track-event-list button strong, +.v2-track-overview-panel strong { font-size: 12px; } +.v2-track-page small, +.v2-track-stop-list button small, +.v2-track-event-list button small { font-size: 10px; } +.v2-track-stop-list > button, .v2-track-event-list > button { min-height: 56px; } +.v2-track-overview-panel dl div { min-height: 30px; align-items: center; font-size: 11px; } +.v2-track-stage-tools button { height: 38px; font-size: 11px; } +.v2-track-coverage-float { min-height: 38px; font-size: 10px; } +.v2-track-coverage-float strong { font-size: 12px; } +.v2-track-current-card { width: 310px; } +.v2-track-current-card header strong { font-size: 14px; } +.v2-track-current-card > div strong { font-size: 12px; } +.v2-track-current-card > p { font-size: 10px; } +.v2-track-dock-summary strong { font-size: 18px; } +.v2-track-dock-summary span, +.v2-track-dock-progress > div, +.v2-track-dock-controls label { font-size: 10px; } + +/* History data table. */ +.v2-history-page { gap: 12px; padding: 16px 20px 20px; } +.v2-history-toolbar { padding: 14px 16px; } +.v2-history-toolbar label { font-size: 11px; } +.v2-history-toolbar input, .v2-history-toolbar select { height: 38px; font-size: 12px; } +.v2-history-summary { min-height: 76px; } +.v2-history-summary small { font-size: 11px; } +.v2-history-summary strong { font-size: 20px; } +.v2-history-table-card > header { min-height: 48px; padding: 0 14px; } +.v2-history-table-card > header strong { font-size: 14px; } +.v2-history-table-scroll table { font-size: 12px; } +.v2-history-table-scroll th { height: 42px; } +.v2-history-table-scroll td { height: 46px; } +.v2-history-table-card > footer { min-height: 44px; font-size: 11px; } +.v2-history-side header strong, +.v2-history-evidence strong { font-size: 13px; } + +/* Mileage query already uses the monitor palette; align its compact metadata. */ +.v2-mileage-page { gap: 14px; padding: 18px 20px 20px; } +.v2-mileage-heading h2 { font-size: 24px; } +.v2-mileage-heading p { font-size: 13px; } +.v2-mileage-filter > label { font-size: 12px; } +.v2-mileage-filter > label > input, +.v2-mileage-multiselect, +.v2-mileage-source-trigger { min-height: 42px; font-size: 13px; } +.v2-mileage-selection > input { font-size: 13px; } +.v2-mileage-chip { height: 28px; font-size: 11px; } +.v2-mileage-summary small, .v2-mileage-summary span { font-size: 11px; } +.v2-mileage-results > header strong { font-size: 14px; } +.v2-mileage-results > header span, +.v2-mileage-results > header em, +.v2-mileage-results > footer { font-size: 11px; } +.v2-mileage-table { font-size: 13px; } +.v2-mileage-table th { height: 44px; font-size: 12px; } +.v2-mileage-table td { height: 54px; } + +/* Alert center: the previous 6–9px command-center scale was unreadable. */ +.v2-alert-page { gap: 12px; overflow: auto; padding: 14px 18px 18px; background: var(--v2-bg); } +.v2-alert-heading { min-height: 50px; margin: 0; background: transparent; padding: 0; } +.v2-alert-heading h2 { font-size: 22px; } +.v2-alert-heading p { margin-left: 14px; font-size: 12px; } +.v2-alert-tabs { min-height: 42px; margin: 0; border: 1px solid var(--v2-border); border-radius: 9px 9px 0 0; padding: 0 14px; } +.v2-alert-tabs button { font-size: 12px; } +.v2-alert-filter { gap: 9px; padding: 12px; } +.v2-alert-filter label { gap: 6px; font-size: 11px; } +.v2-alert-filter label > div, +.v2-alert-filter input, +.v2-alert-filter select, +.v2-alert-filter button { height: 36px; font-size: 12px; } +.v2-alert-kpis { min-height: 76px; margin-top: 0; } +.v2-alert-kpis small { font-size: 11px; } +.v2-alert-kpis strong { font-size: 21px; } +.v2-alert-workspace { min-height: 520px; grid-template-columns: minmax(760px, 1fr) 360px; gap: 12px; margin-top: 0; } +.v2-alert-page strong { font-size: 12px; } +.v2-alert-table-card > header { min-height: 44px; padding: 0 12px; } +.v2-alert-table-card > header strong { font-size: 14px; } +.v2-alert-table-card > header span { font-size: 11px; } +.v2-alert-table-card > header button { height: 32px; font-size: 11px; } +.v2-alert-table-scroll table { font-size: 11px; } +.v2-alert-table-scroll th { height: 40px; } +.v2-alert-table-scroll td { height: 46px; } +.v2-alert-table-scroll td small { font-size: 10px; } +.v2-alert-table-card > footer { min-height: 42px; font-size: 11px; } +.v2-alert-table-card > footer button, .v2-alert-table-card > footer select { height: 30px; font-size: 11px; } +.v2-alert-inspector > header strong { font-size: 14px; } +.v2-alert-inspector h3 { font-size: 12px; } +.v2-alert-inspector dl > div { min-height: 30px; align-items: center; font-size: 11px; } +.v2-alert-actions button { height: 34px; font-size: 11px; } +.v2-alert-rule-list > header strong, +.v2-alert-rule-editor > header strong, +.v2-alert-notifications > header strong { font-size: 14px; } +.v2-alert-rule-list > button { min-height: 66px; } +.v2-alert-rule-list > button strong, +.v2-alert-notifications article strong { font-size: 12px; } +.v2-alert-rule-list > button small, +.v2-alert-notifications article span { font-size: 10px; } +.v2-rule-form-grid label { font-size: 11px; } +.v2-rule-form-grid input, .v2-rule-form-grid select, .v2-rule-form-grid textarea { font-size: 12px; } + +/* Access management: preserve the table-first layout and enlarge work text. */ +.v2-access-page-v3 { gap: 14px; padding: 18px 20px 22px; } +.v2-access-heading h2 { font-size: 22px; } +.v2-access-heading p { font-size: 12px; } +.v2-access-page strong { font-size: 12px; } +.v2-access-filter-v3 { padding: 13px 15px; } +.v2-access-filter-v3 label { gap: 6px; font-size: 11px; } +.v2-access-filter-v3 input, +.v2-access-filter-v3 select, +.v2-access-filter-v3 label > div, +.v2-access-filter-v3 > button { height: 38px; font-size: 12px; } +.v2-access-kpis-v3 { min-height: 76px; } +.v2-access-kpis-v3 small { font-size: 11px; } +.v2-access-kpis-v3 strong { font-size: 20px; } +.v2-access-table-v3 > header { min-height: 54px; padding: 0 14px; } +.v2-access-table-title strong { font-size: 14px; } +.v2-access-table-title span { font-size: 11px; } +.v2-access-table-scroll-v3 table { font-size: 12px; } +.v2-access-table-scroll-v3 th { height: 42px; font-size: 11px; } +.v2-access-table-scroll-v3 td { height: 56px; } +.v2-access-table-v3 > footer { min-height: 44px; font-size: 11px; } +.v2-access-inspector-v3 > header strong { font-size: 15px; } +.v2-access-inspector-summary span, +.v2-access-protocol-cell span { font-size: 11px; } + +@media (max-width: 1280px) { + .v2-alert-workspace { grid-template-columns: minmax(650px, 1fr) 330px; } + .v2-track-page { grid-template-columns: 310px minmax(0, 1fr); } +} + +@media (max-width: 900px) { + :is(.v2-vehicle-search-page, .v2-vehicle-record-page, .v2-track-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page) { + --v2-workspace-control: 13px; + --v2-workspace-meta: 11px; + } + .v2-vehicle-record-page, .v2-history-page, .v2-mileage-page, .v2-alert-page, .v2-access-page-v3 { padding: 12px 10px 18px; } + .v2-alert-heading > div { align-items: flex-start; flex-direction: column; gap: 4px; } + .v2-alert-heading p { margin-left: 0; } + .v2-alert-workspace { min-height: 700px; grid-template-columns: minmax(650px, 1fr); } +} + +@media (max-width: 700px) { + .v2-track-page { display: block; } + .v2-track-query > label, .v2-track-date-grid label { font-size: 12px; } + .v2-track-query-button { font-size: 13px; } + .v2-alert-tabs { overflow-x: auto; } + .v2-alert-tabs button { min-width: max-content; } +} diff --git a/vehicle-data-platform/apps/web/vite.config.ts b/vehicle-data-platform/apps/web/vite.config.ts index 66d4b82f..db3a3205 100644 --- a/vehicle-data-platform/apps/web/vite.config.ts +++ b/vehicle-data-platform/apps/web/vite.config.ts @@ -1,7 +1,7 @@ import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; -const apiProxyTarget = process.env.VITE_API_PROXY_TARGET || 'http://115.29.187.205:20200'; +const apiProxyTarget = process.env.VITE_API_PROXY_TARGET || 'http://115.29.187.205:20300'; export default defineConfig({ plugins: [react()], @@ -10,8 +10,8 @@ export default defineConfig({ }, server: { proxy: { - '/api': apiProxyTarget, - '/_AMapService': apiProxyTarget + '/api': { target: apiProxyTarget, changeOrigin: true }, + '/_AMapService': { target: apiProxyTarget, changeOrigin: true } } }, test: {