feat(platform): make mobile workflows task focused

This commit is contained in:
lingniu
2026-07-16 12:05:01 +08:00
parent 6d82a66d68
commit 069b324565
8 changed files with 227 additions and 13 deletions

View File

@@ -1409,6 +1409,132 @@ button, a { -webkit-tap-highlight-color: transparent; }
*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Mobile task-first interaction layer. Desktop keeps the full workspace. */
.v2-mobile-navigation,
.v2-mobile-more-backdrop,
.v2-mobile-filter-toggle,
.v2-alert-mobile-list,
.v2-access-mobile-list,
.v2-history-mobile-list { display: none; }
@media (max-width: 680px) {
.v2-mobile-navigation { position: fixed; z-index: 90; right: 0; bottom: 0; left: 0; display: grid; height: calc(66px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #dce4ee; background: rgba(255,255,255,.97); padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(20,35,55,.10); backdrop-filter: blur(16px); }
.v2-mobile-nav-item { position: relative; display: flex; min-width: 0; min-height: 54px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 0; border-radius: 10px; background: transparent; color: #718096; text-decoration: none; cursor: pointer; }
.v2-mobile-nav-item > svg { font-size: 20px; }
.v2-mobile-nav-item > span { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.v2-mobile-nav-item.is-active { background: #edf4ff; color: var(--v2-blue); }
.v2-mobile-nav-item.is-active::after { position: absolute; right: 22%; bottom: 1px; left: 22%; height: 2px; border-radius: 2px; background: var(--v2-blue); content: ""; }
.v2-mobile-more-backdrop { position: fixed; z-index: 89; inset: 0 0 calc(65px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; background: rgba(15,23,42,.34); backdrop-filter: blur(2px); }
.v2-mobile-more-sheet { width: 100%; border-radius: 18px 18px 0 0; background: #fff; padding: 12px 14px 18px; box-shadow: 0 -22px 60px rgba(15,23,42,.2); animation: v2-mobile-sheet-enter .18s ease-out; }
.v2-mobile-more-sheet > header { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px; }
.v2-mobile-more-sheet > header div { display: flex; flex-direction: column; gap: 3px; }
.v2-mobile-more-sheet > header strong { color: #17253a; font-size: 17px; }
.v2-mobile-more-sheet > header span { color: #8290a3; font-size: 11px; }
.v2-mobile-more-sheet > header button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 20px; background: #f1f5f9; color: #64748b; font-size: 23px; }
.v2-mobile-more-sheet > nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.v2-mobile-more-sheet .v2-mobile-nav-item { min-height: 76px; border: 1px solid #e5eaf1; background: #f8fafc; }
.v2-main { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
.v2-mobile-filter-toggle { display: flex; width: 100%; min-height: 54px; flex: 0 0 auto; align-items: center; justify-content: space-between; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; padding: 8px 12px; color: #26364b; box-shadow: 0 3px 12px rgba(25,39,59,.04); text-align: left; }
.v2-mobile-filter-toggle > span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.v2-mobile-filter-toggle b { font-size: 13px; }
.v2-mobile-filter-toggle small { overflow: hidden; color: #7a889b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.v2-mobile-filter-toggle em { flex: 0 0 auto; border-radius: 14px; background: #edf4ff; padding: 5px 10px; color: var(--v2-blue); font-size: 11px; font-style: normal; font-weight: 700; }
:is(.v2-alert-filter,.v2-access-filter-v3,.v2-history-toolbar,.v2-mileage-filter).is-mobile-collapsed { display: none !important; }
.v2-alert-heading > div,
.v2-access-heading > div:first-child,
.v2-mileage-heading > div { display: none; }
.v2-alert-heading { display: none; }
.v2-access-heading { justify-content: flex-end; min-height: 40px; }
.v2-access-heading > div:last-child { width: 100%; }
.v2-mileage-heading { justify-content: flex-end; min-height: 40px; }
.v2-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: hidden; }
.v2-kpi { width: auto; min-width: 0; min-height: 64px; padding: 9px 11px; }
.v2-kpi:nth-child(3), .v2-kpi:nth-child(4), .v2-kpi:nth-child(5), .v2-kpi:nth-child(7) { display: none; }
.v2-kpi + .v2-kpi::before { display: block; }
.v2-monitor-workspace,
.v2-monitor-workspace.is-detail-open,
.v2-monitor-workspace.is-detail-collapsed { min-height: max(430px, calc(100dvh - 330px)); grid-template-columns: 1fr; grid-template-rows: minmax(430px, 1fr); }
.v2-monitor-workspace > .v2-vehicle-rail { display: none; }
.v2-monitor-workspace > .v2-fleet-map { grid-row: 1; }
.v2-vehicle-detail { height: min(58dvh, 520px); }
.v2-alert-page { gap: 9px; }
.v2-alert-kpis { display: flex; min-height: 70px; overflow-x: auto; scroll-snap-type: x proximity; }
.v2-alert-kpis button { min-width: 116px; flex: 0 0 116px; scroll-snap-align: start; }
.v2-alert-workspace { display: flex; min-height: 0; flex-direction: column; }
.v2-alert-table-card { height: auto; min-height: 420px; }
.v2-alert-table-scroll { overflow: visible; }
.v2-alert-table-scroll table { display: none; }
.v2-alert-mobile-list { display: flex; flex-direction: column; background: #f5f7fa; padding: 8px; gap: 8px; }
.v2-alert-mobile-list > button { width: 100%; border: 1px solid #e0e7f0; border-radius: 10px; background: #fff; padding: 12px; color: #334155; text-align: left; box-shadow: 0 2px 8px rgba(20,35,55,.04); }
.v2-alert-mobile-list > button.is-selected { border-color: #8eb8f8; box-shadow: 0 0 0 2px rgba(18,104,243,.08); }
.v2-alert-mobile-list header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-alert-mobile-list header > strong { font-size: 15px; }
.v2-alert-mobile-list header > span { display: flex; gap: 5px; }
.v2-alert-mobile-list p { margin: 9px 0; color: #26364b; font-size: 13px; font-weight: 700; }
.v2-alert-mobile-list dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin: 0; border-top: 1px solid #edf1f5; padding-top: 10px; }
.v2-alert-mobile-list dt { color: #8a97a9; font-size: 10px; }
.v2-alert-mobile-list dd { margin: 3px 0 0; color: #46566c; font-size: 11px; font-weight: 650; }
.v2-alert-inspector { max-height: none; margin-top: 10px; }
.v2-access-kpis-v3 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; }
.v2-access-kpis-v3 button { min-width: 0; min-height: 74px; flex: none; }
.v2-access-workspace-v3 { min-height: 480px; flex-basis: auto; }
.v2-access-table-v3 > header { min-height: 0; }
.v2-access-table-title > span, .v2-access-protocol-coverage { display: none; }
.v2-access-table-actions { justify-content: flex-end; }
.v2-access-table-scroll-v3 { overflow: visible; }
.v2-access-table-scroll-v3 table { display: none; }
.v2-access-mobile-list { display: flex; flex-direction: column; gap: 8px; background: #f5f7fa; padding: 8px; }
.v2-access-mobile-list > button { width: 100%; border: 1px solid #e0e7ef; border-radius: 10px; background: #fff; padding: 12px; color: #334155; text-align: left; }
.v2-access-mobile-list > button.is-selected { border-color: #8eb8f8; box-shadow: 0 0 0 2px rgba(18,104,243,.08); }
.v2-access-mobile-list > button > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.v2-access-mobile-list > button > header > div:first-child { min-width: 0; }
.v2-access-mobile-list > button > header > div:first-child strong,
.v2-access-mobile-list > button > header > div:first-child span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-access-mobile-list > button > header > div:first-child strong { font-size: 15px; }
.v2-access-mobile-list > button > header > div:first-child span { margin-top: 3px; color: #8491a3; font-size: 10px; }
.v2-access-mobile-list > button > p { margin: 9px 0; color: #68768a; font-size: 11px; }
.v2-access-mobile-list > button > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; border-top: 1px solid #edf1f5; padding-top: 9px; }
.v2-access-mobile-list .v2-access-protocol-cell { min-width: 0; border-radius: 7px; background: #f7f9fc; padding: 7px; }
.v2-access-mobile-list .v2-access-protocol-cell strong { font-size: 9px; }
.v2-access-mobile-list .v2-access-protocol-cell small { display: none; }
.v2-history-page { gap: 9px; }
.v2-history-metrics { max-height: 48px; overflow-x: auto; flex-wrap: nowrap; }
.v2-history-main { display: flex; height: auto; min-height: 0; flex-direction: column; }
.v2-history-summary { min-height: 92px; }
.v2-history-table-card { order: 2; height: auto; min-height: 380px; }
.v2-history-trend { order: 3; min-height: 220px; margin-top: 10px; }
.v2-history-table-scroll { overflow: visible; }
.v2-history-table-scroll table { display: none; }
.v2-history-mobile-list { display: flex; flex-direction: column; gap: 8px; background: #f5f7fa; padding: 8px; }
.v2-history-mobile-list > button { width: 100%; border: 1px solid #e0e7ef; border-radius: 10px; background: #fff; padding: 12px; color: #334155; text-align: left; }
.v2-history-mobile-list > button.is-selected { border-color: #8eb8f8; }
.v2-history-mobile-list header, .v2-history-mobile-list p { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-history-mobile-list header > div { min-width: 0; }
.v2-history-mobile-list header strong, .v2-history-mobile-list header > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-history-mobile-list header strong { font-size: 14px; }
.v2-history-mobile-list header > div > span { margin-top: 3px; color: #8794a5; font-size: 10px; }
.v2-history-mobile-list p { margin: 9px 0; color: #718096; font-size: 10px; }
.v2-history-mobile-list p b { color: var(--v2-blue); }
.v2-history-mobile-list dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; border-top: 1px solid #edf1f5; padding-top: 9px; }
.v2-history-mobile-list dt { color: #8a97a9; font-size: 9px; }
.v2-history-mobile-list dd { margin: 3px 0 0; font-size: 11px; font-weight: 700; }
.v2-history-mobile-list > button > em { display: block; margin-top: 10px; color: var(--v2-blue); font-size: 11px; font-style: normal; font-weight: 700; text-align: right; }
.v2-history-side { margin-top: 10px; }
.v2-mileage-query-panel { padding: 8px; }
.v2-mileage-query-panel > .v2-mobile-filter-toggle { margin-bottom: 8px; }
.v2-mileage-filter.is-mobile-collapsed + .v2-mileage-validation { margin-top: 4px; }
.v2-track-page.is-rail-collapsed { display: grid; grid-template-columns: minmax(0,1fr); }
.v2-track-page.is-rail-collapsed .v2-track-stage { min-height: calc(100dvh - 118px - env(safe-area-inset-bottom)); }
}
/* Track replay command center — map-first layout based on the G7 reference. */
.v2-track-page { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-columns: 320px minmax(0, 1fr); gap: 0; overflow: hidden; padding: 0; background: #e9eef4; }
.v2-track-page.is-rail-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
@@ -1747,3 +1873,28 @@ button, a { -webkit-tap-highlight-color: transparent; }
.v2-alert-tabs { overflow-x: auto; }
.v2-alert-tabs button { min-width: max-content; }
}
/* Keep mobile task layouts authoritative after the desktop typography layer. */
@media (max-width: 680px) {
.v2-alert-heading { display: none; }
.v2-alert-workspace { display: flex; min-height: 0; grid-template-columns: none; flex-direction: column; }
.v2-alert-table-card { height: auto; min-height: 420px; }
.v2-alert-table-scroll table { display: none; }
.v2-alert-mobile-list { display: flex; }
.v2-access-heading > div:first-child,
.v2-mileage-heading > div { display: none; }
.v2-access-kpis-v3 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; }
.v2-access-kpis-v3 button { min-width: 0; flex: none; }
.v2-access-kpis-v3 small { flex: 0 0 auto; white-space: nowrap; }
.v2-access-kpis-v3 em { display: none; }
.v2-access-workspace-v3 { min-height: 480px; flex-basis: auto; }
.v2-access-table-scroll-v3 table { display: none; }
.v2-access-mobile-list { display: flex; }
.v2-history-main { display: flex; height: auto; min-height: 0; flex-direction: column; }
.v2-history-table-card { height: auto; min-height: 380px; order: 2; }
.v2-history-trend { order: 3; }
.v2-history-table-scroll table { display: none; }
.v2-history-mobile-list { display: flex; }
:is(.v2-alert-filter,.v2-access-filter-v3,.v2-history-toolbar,.v2-mileage-filter).is-mobile-collapsed { display: none !important; }
.v2-track-page.is-rail-collapsed { display: grid; grid-template-columns: minmax(0,1fr); }
}