mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
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
This commit is contained in:
@@ -3,6 +3,28 @@ import type { SectionConfigOverrides } from "./types";
|
||||
const lpr: SectionConfigOverrides = {
|
||||
base: {
|
||||
sectionDocs: "/configuration/license_plate_recognition",
|
||||
messages: [
|
||||
{
|
||||
key: "global-disabled",
|
||||
messageKey: "configMessages.lpr.globalDisabled",
|
||||
severity: "warning",
|
||||
condition: (ctx) => {
|
||||
if (ctx.level !== "camera") return false;
|
||||
return ctx.fullConfig.lpr?.enabled === false;
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "vehicle-not-tracked",
|
||||
messageKey: "configMessages.lpr.vehicleNotTracked",
|
||||
severity: "info",
|
||||
condition: (ctx) => {
|
||||
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||
if (ctx.fullCameraConfig.type === "lpr") return false;
|
||||
const tracked = ctx.fullCameraConfig.objects?.track ?? [];
|
||||
return !tracked.some((o) => ["car", "motorcycle"].includes(o));
|
||||
},
|
||||
},
|
||||
],
|
||||
fieldDocs: {
|
||||
enhancement: "/configuration/license_plate_recognition#enhancement",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user