feat(preview): add vehicle incident cards

This commit is contained in:
2026-08-12 11:29:13 +08:00
parent f13d890ffb
commit 761a52646c
7 changed files with 271 additions and 6 deletions

View File

@@ -20,7 +20,8 @@ body.scene-ready #cesiumContainer {
#controls,
#diagnostics,
#status {
#status,
#vehicleInfoCard {
position: absolute;
z-index: 1;
border-radius: 4px;
@@ -160,6 +161,96 @@ body.scene-error .loading-bar span {
white-space: pre-line;
}
#vehicleInfoCard {
left: 0;
top: 0;
width: min(300px, calc(100vw - 24px));
padding: 10px 12px;
transform: translate(-50%, calc(-100% - 18px));
transform-origin: bottom center;
pointer-events: auto;
}
#vehicleInfoCard::after {
position: absolute;
left: 50%;
bottom: -7px;
width: 12px;
height: 12px;
content: "";
transform: translateX(-50%) rotate(45deg);
background: rgba(20, 24, 28, 0.82);
}
.vehicle-card-heading,
.vehicle-card-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.vehicle-card-heading strong {
font-size: 13px;
}
#vehicleInfoCard button {
height: 27px;
border: 0;
border-radius: 4px;
padding: 0 8px;
background: #f2f5f7;
color: #111;
cursor: pointer;
}
#vehicleInfoDetails {
display: grid;
grid-template-columns: 88px 1fr;
gap: 4px 8px;
margin: 10px 0;
}
#vehicleInfoDetails dt {
color: rgba(255, 255, 255, 0.62);
}
#vehicleInfoDetails dd {
margin: 0;
overflow-wrap: anywhere;
}
.vehicle-card-field {
display: grid;
gap: 4px;
color: rgba(255, 255, 255, 0.78);
}
#vehicleIncidentNote {
box-sizing: border-box;
width: 100%;
resize: vertical;
border: 1px solid rgba(255, 255, 255, 0.30);
border-radius: 4px;
padding: 6px;
background: rgba(255, 255, 255, 0.12);
color: #fff;
font: inherit;
}
.vehicle-card-actions {
justify-content: flex-start;
margin-top: 10px;
}
.vehicle-card-actions button[data-vehicle-status="breakdown"] {
background: #f3c84b;
}
.vehicle-card-actions button[data-vehicle-status="accident"] {
background: #e95950;
}
#controls button,
#controls select {
height: 28px;
@@ -285,4 +376,5 @@ body.scene-error .loading-bar span {
bottom: 10px;
max-width: none;
}
}