Files
frigate/web/src/components/config-form/section-configs/snapshots.ts
T
Josh HawkinsandGitHub 953d244c52 Add UI config messages framework (#22692)
* add config messages to sections and fields

* add alert variants

* add messages to types

* add detect fps, review, and audio messages

* add a basic set of messages

* remove emptySelectionHintKey from switches widget

use the new messages framework and revert the changes made in #22664
2026-03-29 15:25:40 -06:00

50 lines
1.2 KiB
TypeScript

import type { SectionConfigOverrides } from "./types";
const snapshots: SectionConfigOverrides = {
base: {
sectionDocs: "/configuration/snapshots",
messages: [
{
key: "detect-disabled",
messageKey: "configMessages.snapshots.detectDisabled",
severity: "info",
condition: (ctx) => {
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
return ctx.fullCameraConfig.detect?.enabled === false;
},
},
],
restartRequired: [],
fieldOrder: [
"enabled",
"bounding_box",
"crop",
"quality",
"timestamp",
"retain",
],
fieldGroups: {
display: ["bounding_box", "crop", "quality", "timestamp"],
},
hiddenFields: ["enabled_in_config"],
advancedFields: ["height", "quality", "retain"],
uiSchema: {
required_zones: {
"ui:widget": "zoneNames",
"ui:options": {
suppressMultiSchema: true,
},
},
},
},
global: {
restartRequired: [],
hiddenFields: ["enabled_in_config", "required_zones"],
},
camera: {
restartRequired: [],
},
};
export default snapshots;