mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 00:22:19 +03:00
* 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
50 lines
1.2 KiB
TypeScript
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;
|