sort preview cameras in history by ui order

This commit is contained in:
Josh Hawkins 2026-07-06 16:20:30 -05:00
parent 4ee12e6237
commit 105d1e8885

View File

@ -75,11 +75,13 @@ export default function Events() {
return [] as string[];
}
return Object.keys(config.cameras).filter(
(cam) =>
allowedCameras.includes(cam) &&
config.cameras[cam]?.ui?.review !== false,
);
return Object.values(config.cameras)
.filter(
(conf) =>
allowedCameras.includes(conf.name) && conf.ui?.review !== false,
)
.sort((aConf, bConf) => aConf.ui.order - bConf.ui.order)
.map((conf) => conf.name);
}, [allowedCameras, config?.cameras]);
const selectedMotionSearchCamera = useMemo(() => {