Add adaptive per-vehicle layouts, full-panel dragging, source controls and automatic preview recovery for RealSense, Insta360 X4 and XGRIDS K1 observation views. Integrate cached Cesium map layers through the private NAS gateway link, retain bounded sensor command receipts, and document validation and operational handoff.
10 lines
626 B
TypeScript
10 lines
626 B
TypeScript
import type {ReactNode} from 'react';
|
|
import {createPortal} from 'react-dom';
|
|
import {StatusBadge} from '@nodedc/ui-react';
|
|
import type {ObservationHeaderTargets} from './observation';
|
|
|
|
/** The source owns liveness and retry actions; the host owns header placement. */
|
|
export function ObservationHeader({targets,live,label,children}:{targets:ObservationHeaderTargets;live:boolean;label:string;children?:ReactNode}){
|
|
return <>{createPortal(<StatusBadge variant="indicator" tone={live?'success':'neutral'} role="img" aria-label={label} title={label}/>,targets.statusTarget)}{createPortal(children,targets.actionsTarget)}</>;
|
|
}
|