Fix onboard BLE admission and stage wireless device enrollment

This commit is contained in:
DCCONSTRUCTIONS
2026-09-07 12:11:48 +03:00
parent 2fdf1d3cc4
commit 77acb377e2
17 changed files with 297 additions and 65 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
import type {ComponentType} from 'react';
import type {ComponentType,ReactNode} from 'react';
import type {IconName} from '@nodedc/ui-react';
import type {Sensor, SensorTransport} from './contracts';
import type {EnrollmentTransport} from './enrollment';
@@ -11,6 +11,7 @@ export interface SensorDetailProps {
}
export interface SensorEnrollmentProps {
transport:EnrollmentTransport; onClose:()=>void; onChange:()=>void;
renderWindow:(view:{content:ReactNode;actions?:ReactNode;busy?:boolean})=>ReactNode;
}
export interface SensorUiContribution {
kind:string;
@@ -18,6 +19,11 @@ export interface SensorUiContribution {
icon:IconName;
retainOffline:boolean;
supportsPreparation:boolean;
wirelessEnrollment?:{label:string;View:ComponentType<SensorEnrollmentProps>};
}
export function wirelessContributions(contributions:readonly SensorUiContribution[]):SensorUiContribution[] {
return contributions.filter(value=>value.wirelessEnrollment&&contributions.filter(other=>other.kind===value.kind).length===1);
}
export function sensorContribution(