mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 00:22:19 +03:00
form tweaks
This commit is contained in:
@@ -16,7 +16,7 @@ export const AudioSection = createConfigSection({
|
||||
"num_threads",
|
||||
],
|
||||
fieldGroups: {
|
||||
detection: ["listen", "filters"],
|
||||
detection: ["enabled", "listen", "filters"],
|
||||
sensitivity: ["min_volume", "max_not_heard"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
|
||||
@@ -18,7 +18,7 @@ export const DetectSection = createConfigSection({
|
||||
"stationary",
|
||||
],
|
||||
fieldGroups: {
|
||||
resolution: ["width", "height"],
|
||||
resolution: ["enabled", "width", "height"],
|
||||
tracking: ["min_initialized", "max_disappeared"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
|
||||
@@ -20,7 +20,7 @@ export const MotionSection = createConfigSection({
|
||||
"mqtt_off_delay",
|
||||
],
|
||||
fieldGroups: {
|
||||
sensitivity: ["threshold", "contour_area"],
|
||||
sensitivity: ["enabled", "threshold", "contour_area"],
|
||||
algorithm: ["improve_contrast", "delta_alpha", "frame_alpha"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config", "mask", "raw_mask"],
|
||||
|
||||
@@ -18,7 +18,7 @@ export const RecordSection = createConfigSection({
|
||||
"export",
|
||||
],
|
||||
fieldGroups: {
|
||||
retention: ["continuous", "motion"],
|
||||
retention: ["enabled", "continuous", "motion"],
|
||||
events: ["alerts", "detections"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config", "sync_recordings"],
|
||||
|
||||
@@ -7,7 +7,7 @@ export const ReviewSection = createConfigSection({
|
||||
sectionPath: "review",
|
||||
i18nNamespace: "config/review",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["alerts", "detections"],
|
||||
fieldOrder: ["alerts", "detections", "genai"],
|
||||
fieldGroups: {},
|
||||
hiddenFields: [
|
||||
"enabled_in_config",
|
||||
@@ -20,6 +20,16 @@ export const ReviewSection = createConfigSection({
|
||||
"genai.enabled_in_config",
|
||||
],
|
||||
advancedFields: [],
|
||||
uiSchema: {
|
||||
genai: {
|
||||
additional_concerns: {
|
||||
"ui:widget": "textarea",
|
||||
},
|
||||
activity_context_prompt: {
|
||||
"ui:widget": "textarea",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export const SnapshotsSection = createConfigSection({
|
||||
"retain",
|
||||
],
|
||||
fieldGroups: {
|
||||
display: ["bounding_box", "crop", "quality", "timestamp"],
|
||||
display: ["enabled", "bounding_box", "crop", "quality", "timestamp"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
advancedFields: ["quality", "retain"],
|
||||
|
||||
@@ -8,10 +8,7 @@ export const TimestampSection = createConfigSection({
|
||||
i18nNamespace: "config/timestamp_style",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["position", "format", "color", "thickness"],
|
||||
fieldGroups: {
|
||||
appearance: ["color", "thickness"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
hiddenFields: ["effect", "enabled_in_config"],
|
||||
advancedFields: [],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -46,7 +46,9 @@ export function FieldTemplate(props: FieldTemplateProps) {
|
||||
|
||||
// Determine field characteristics
|
||||
const isAdvanced = uiOptions.advanced === true;
|
||||
const isBoolean = schema.type === "boolean";
|
||||
const isBoolean =
|
||||
schema.type === "boolean" ||
|
||||
(Array.isArray(schema.type) && schema.type.includes("boolean"));
|
||||
const isObjectField = schema.type === "object";
|
||||
const isNullableUnion = isNullableUnionSchema(schema as StrictRJSFSchema);
|
||||
const suppressMultiSchema =
|
||||
@@ -135,7 +137,7 @@ export function FieldTemplate(props: FieldTemplateProps) {
|
||||
</Label>
|
||||
)}
|
||||
{finalDescription && !isMultiSchemaWrapper && (
|
||||
<p className="max-w-md text-xs text-muted-foreground">
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{finalDescription}
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user