frigate/web/src/components/config-form/section-configs/detect.ts
Josh Hawkins df27e04c0f
Frontend updates (#22327)
* add optional field widget

adds a switch to enable nullable fields like skip_motion_threshold

* config field updates

add skip_motion_threshold optional switch
add fps back to detect restart required

* don't use ternary operator when displaying motion previews

the main previews were being unnecessarily unmounted

* lazy mount motion preview clips to reduce DOM overhead
2026-03-08 12:27:53 -05:00

53 lines
1.0 KiB
TypeScript

import type { SectionConfigOverrides } from "./types";
const detect: SectionConfigOverrides = {
base: {
sectionDocs: "/configuration/camera_specific",
fieldOrder: [
"enabled",
"width",
"height",
"fps",
"min_initialized",
"max_disappeared",
"annotation_offset",
"stationary",
"interval",
"threshold",
"max_frames",
],
restartRequired: [],
fieldGroups: {
resolution: ["enabled", "width", "height", "fps"],
tracking: ["min_initialized", "max_disappeared"],
},
hiddenFields: ["enabled_in_config"],
advancedFields: [
"min_initialized",
"max_disappeared",
"annotation_offset",
"stationary",
],
},
global: {
restartRequired: [
"fps",
"width",
"height",
"min_initialized",
"max_disappeared",
],
},
camera: {
restartRequired: [
"fps",
"width",
"height",
"min_initialized",
"max_disappeared",
],
},
};
export default detect;