feat(web): unify Semi UI workspace states

This commit is contained in:
lingniu
2026-07-18 00:59:11 +08:00
parent 159c80b0ae
commit 1cd92715a5
13 changed files with 639 additions and 46 deletions

View File

@@ -10087,12 +10087,14 @@ button, a { -webkit-tap-highlight-color: transparent; }
.v2-vehicle-search-page {
align-content: start;
place-items: start center;
gap: 14px;
overflow: auto;
background: var(--v2-bg);
padding: clamp(32px, 6vh, 64px) var(--v2-page-gutter) 32px;
padding: clamp(24px, 4vh, 40px) var(--v2-page-gutter) 32px;
}
.v2-vehicle-search-card.semi-card {
width: min(900px, 100%);
.v2-vehicle-search-card.semi-card,
.v2-vehicle-recent-card.semi-card {
width: min(1040px, 100%);
border-color: var(--v2-surface-border);
border-radius: 14px;
box-shadow: var(--v2-surface-shadow);
@@ -10201,6 +10203,105 @@ button, a { -webkit-tap-highlight-color: transparent; }
width: max-content;
margin: 16px 0 0 auto;
}
.v2-vehicle-recent-card > .semi-card-body {
overflow: hidden;
border-radius: inherit;
}
.v2-vehicle-recent-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
padding: 12px;
}
.v2-vehicle-recent-item.semi-button {
display: block;
width: 100%;
min-width: 0;
height: auto;
min-height: 82px;
border: 1px solid #e3eaf2;
border-radius: 10px;
background: #fbfcfe;
padding: 11px 34px 10px 12px;
color: #26374d;
text-align: left;
transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.v2-vehicle-recent-item.semi-button:hover,
.v2-vehicle-recent-item.semi-button:focus-visible {
border-color: #b8d1fb;
background: #f5f9ff;
box-shadow: 0 6px 18px rgba(33, 102, 217, .08);
transform: translateY(-1px);
}
.v2-vehicle-recent-item .semi-button-content {
position: relative;
display: grid;
min-width: 0;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-rows: auto auto;
align-items: center;
gap: 8px;
}
.v2-vehicle-recent-identity {
display: grid;
min-width: 0;
gap: 3px;
}
.v2-vehicle-recent-identity strong {
overflow: hidden;
color: #182438;
font-size: 14px;
font-weight: 720;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-vehicle-recent-identity small,
.v2-vehicle-recent-status small {
overflow: hidden;
color: #8391a4;
font-size: 9px;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
}
.v2-vehicle-recent-status {
display: grid;
justify-items: end;
gap: 4px;
}
.v2-vehicle-recent-protocols {
display: flex;
min-width: 0;
gap: 4px;
}
.v2-vehicle-recent-protocols .semi-tag,
.v2-vehicle-recent-status .semi-tag {
margin: 0;
}
.v2-vehicle-recent-arrow {
position: absolute;
top: 50%;
right: -24px;
color: #9aabba;
transform: translateY(-50%);
}
.v2-vehicle-recent-state {
display: flex;
min-height: 128px;
align-items: center;
justify-content: center;
gap: 9px;
color: #718096;
font-size: 12px;
}
.v2-vehicle-recent-state.is-error {
flex-direction: column;
color: var(--semi-color-danger);
}
.v2-vehicle-recent-empty.semi-empty {
padding: 22px 16px 28px;
}
@media (max-width: 680px) {
.v2-vehicle-search-page {
@@ -10212,7 +10313,8 @@ button, a { -webkit-tap-highlight-color: transparent; }
width: auto;
flex: 1 1 100%;
}
.v2-vehicle-search-card.semi-card {
.v2-vehicle-search-card.semi-card,
.v2-vehicle-recent-card.semi-card {
width: 100%;
min-width: 0;
border-radius: 12px;
@@ -10290,6 +10392,34 @@ button, a { -webkit-tap-highlight-color: transparent; }
justify-content: center;
margin-top: 12px;
}
.v2-vehicle-recent-grid {
grid-template-columns: 1fr;
gap: 0;
padding: 4px 10px 8px;
}
.v2-vehicle-recent-item.semi-button {
min-height: 62px;
border: 0;
border-bottom: 1px solid #edf1f6;
border-radius: 0;
background: transparent;
padding: 8px 28px 8px 2px;
}
.v2-vehicle-recent-item.semi-button:last-child {
border-bottom: 0;
}
.v2-vehicle-recent-item.semi-button:hover,
.v2-vehicle-recent-item.semi-button:focus-visible {
background: #f5f9ff;
box-shadow: none;
transform: none;
}
.v2-vehicle-recent-identity strong {
font-size: 13px;
}
.v2-vehicle-recent-arrow {
right: -20px;
}
}
/* Semi UI history hierarchy: keep evidence rows primary and aggregate trends explicitly on demand. */

View File

@@ -2358,3 +2358,286 @@
font-size: 10px;
}
}
/* Unified Semi UI state language: page, panel and inline recovery surfaces. */
.v2-state-surface {
box-sizing: border-box;
width: 100%;
min-width: 0;
color: #607086;
}
.v2-state-surface.is-page {
display: grid;
min-height: 100%;
align-content: center;
justify-items: center;
gap: 24px;
background:
radial-gradient(circle at 50% 35%, rgba(18, 104, 243, .06), transparent 32%),
var(--v2-bg);
padding: clamp(24px, 5vw, 54px);
}
.v2-state-surface.is-panel {
position: relative;
inset: auto;
display: grid;
min-height: 164px;
align-content: center;
justify-items: center;
gap: 18px;
border: 0;
background: linear-gradient(180deg, rgba(249, 251, 254, .72), rgba(255, 255, 255, .98));
padding: 22px;
}
.v2-state-surface.is-inline {
display: flex;
min-height: 52px;
align-items: center;
border: 1px solid #dfe7f1;
border-radius: 10px;
background: rgba(255, 255, 255, .96);
padding: 9px 12px;
}
.v2-state-surface.is-error.is-inline {
border-color: #f3c7c4;
background: #fff8f7;
color: #b42318;
}
.v2-state-message {
display: flex;
min-width: 0;
align-items: center;
justify-content: center;
gap: 12px;
}
.v2-state-icon {
display: grid;
width: 38px;
height: 38px;
flex: 0 0 auto;
place-items: center;
border-radius: 11px;
background: #edf4ff;
color: var(--v2-blue);
}
.v2-state-surface.is-error .v2-state-icon {
background: #fff0ef;
color: #d92d20;
}
.v2-state-copy {
display: grid;
min-width: 0;
gap: 4px;
}
.v2-state-copy > .semi-typography {
display: block;
margin: 0;
}
.v2-state-copy > .semi-typography-primary {
color: #293a50;
font-size: 13px;
font-weight: 700;
}
.v2-state-copy > .semi-typography-tertiary,
.v2-state-copy > .semi-typography-danger {
overflow: hidden;
color: #7e8c9f;
font-size: 10px;
line-height: 1.55;
text-overflow: ellipsis;
}
.v2-state-copy > .semi-typography-danger {
color: #a63a32;
}
.v2-state-action {
display: flex;
flex: 0 0 auto;
margin-left: 10px;
}
.v2-state-action > .semi-button {
min-height: 34px;
border-radius: 8px;
font-weight: 650;
}
.v2-state-skeleton {
display: grid;
width: min(780px, 100%);
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
}
.v2-state-skeleton > i {
min-height: 58px;
border: 1px solid #eaf0f6;
border-radius: 10px;
background: linear-gradient(100deg, #f3f6fa 24%, #eaf1f8 38%, #f3f6fa 54%);
background-size: 300% 100%;
animation: v2-skeleton 1.4s ease infinite;
}
.v2-state-surface.is-page .v2-state-skeleton {
width: min(960px, 100%);
}
.v2-state-surface.is-page .v2-state-skeleton > i {
min-height: 92px;
}
.v2-state-surface.is-page .v2-state-skeleton > i:last-child {
min-height: 240px;
grid-column: 1 / -1;
}
.v2-state-surface.is-panel.is-compact {
position: sticky;
z-index: 3;
top: 0;
display: flex;
width: 100%;
min-height: 42px;
justify-content: center;
border-bottom: 1px solid #dfe8f2;
background: rgba(248, 251, 255, .94);
padding: 5px 12px;
backdrop-filter: blur(8px);
}
.v2-state-surface.is-panel.is-compact .v2-state-icon {
width: 28px;
height: 28px;
border-radius: 8px;
}
.v2-state-surface.is-panel.is-compact .v2-state-copy {
display: flex;
align-items: baseline;
gap: 7px;
}
.v2-state-surface.is-panel.is-compact .v2-state-skeleton {
display: none;
}
.v2-state-empty.semi-empty {
box-sizing: border-box;
width: 100%;
min-height: 140px;
justify-content: center;
padding: 20px;
}
.v2-state-empty .semi-empty-image {
height: 54px;
margin-bottom: 10px;
opacity: .8;
}
.v2-state-empty .semi-empty-title {
color: #33465d;
font-size: 13px;
font-weight: 700;
}
.v2-state-empty .semi-empty-description {
max-width: 440px;
margin-top: 6px;
color: #8491a3;
font-size: 10px;
line-height: 1.6;
}
.v2-state-empty .semi-empty-content {
margin-top: 14px;
}
.v2-state-surface.is-inline .v2-state-empty.semi-empty {
min-height: 50px;
align-items: flex-start;
padding: 4px 0;
}
.v2-state-surface.is-inline .v2-state-empty .semi-empty-image,
.v2-state-surface.is-inline .v2-state-empty .semi-empty-description {
display: none;
}
@media (max-width: 680px) {
.v2-state-surface.is-page {
gap: 18px;
padding: 18px 12px 88px;
}
.v2-state-surface.is-panel {
min-height: 142px;
padding: 18px 12px;
}
.v2-state-message {
max-width: 100%;
gap: 9px;
}
.v2-state-icon {
width: 34px;
height: 34px;
border-radius: 9px;
}
.v2-state-copy > .semi-typography-primary {
font-size: 12px;
}
.v2-state-copy > .semi-typography-tertiary,
.v2-state-copy > .semi-typography-danger {
font-size: 9px;
}
.v2-state-skeleton {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.v2-state-skeleton > i:last-child {
grid-column: 1 / -1;
}
.v2-state-surface.is-page .v2-state-skeleton > i {
min-height: 72px;
}
.v2-state-surface.is-page .v2-state-skeleton > i:last-child {
min-height: 190px;
}
.v2-state-surface.is-inline {
align-items: stretch;
padding: 9px;
}
.v2-state-surface.is-inline .v2-state-message {
width: 100%;
align-items: flex-start;
}
.v2-state-surface.is-inline .v2-state-action {
margin-left: auto;
}
.v2-state-surface.is-panel.is-compact .v2-state-copy > .semi-typography-tertiary {
display: none;
}
}