feat(platform-web): show searched vehicle identity context

This commit is contained in:
lingniu
2026-07-04 02:35:55 +08:00
parent 337e9f3dac
commit 80bd726455
3 changed files with 7 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ export function AppShell({
activePage,
linkIssueCount,
currentVehicleStatus,
currentVehicleLabel,
onChange,
onVehicleSearch,
children
@@ -43,6 +44,7 @@ export function AppShell({
activePage: PageKey;
linkIssueCount: number | null;
currentVehicleStatus?: VehicleServiceStatus;
currentVehicleLabel?: string;
onChange: (page: PageKey) => void;
onVehicleSearch: (keyword: string) => void | Promise<void>;
children: ReactNode;
@@ -89,6 +91,7 @@ export function AppShell({
<Button theme="solid" type="primary" loading={searching} onClick={search}></Button>
</Space>
<Space spacing={12}>
{currentVehicleLabel ? <Tag color="grey">{currentVehicleLabel}</Tag> : null}
{currentVehicleStatus ? (
<Tag color={currentVehicleStatus.severity === 'ok' ? 'green' : currentVehicleStatus.severity === 'error' ? 'red' : 'orange'}>
{currentVehicleStatus.title}