feat(x4): add per-camera manual wake and hide power action when connected
This commit is contained in:
@@ -21,10 +21,16 @@ export interface SensorUiContribution {
|
||||
retainOffline:boolean;
|
||||
supportsPreparation:boolean;
|
||||
supportsRenaming?:boolean;
|
||||
rowActions?:(device:Sensor)=>readonly SensorRowAction[];
|
||||
status?:(device:Sensor,fresh:boolean)=>{label:string;tone:'neutral'|'success'|'warning'|'danger'};
|
||||
wirelessEnrollment?:{label:string;View:ComponentType<SensorEnrollmentProps>};
|
||||
}
|
||||
|
||||
export interface SensorRowAction {
|
||||
actionId:string; label:string; description?:string; disabled?:boolean;
|
||||
parameters?:Record<string,unknown>;
|
||||
}
|
||||
|
||||
export function wirelessContributions(contributions:readonly SensorUiContribution[]):SensorUiContribution[] {
|
||||
return contributions.filter(value=>value.wirelessEnrollment&&contributions.filter(other=>other.kind===value.kind).length===1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user