mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Profiles fixes (#23306)
* add prop to disable id field * disable id field when editing profile mask/zone also, disable if the zone name already exists in required_zones or the base config is being edited and the id already exists on a profile * add backend validation to reject profile-omly masks/zones * add tests * update docs * tweak
This commit is contained in:
@@ -258,8 +258,9 @@ export default function MotionMaskEditPane({
|
||||
},
|
||||
);
|
||||
updateConfig();
|
||||
// Only publish WS state for base config when mask has a name
|
||||
if (!editingProfile && maskName) {
|
||||
// Only publish WS state for base config when mask has a name and
|
||||
// wasn't renamed (the hook is bound to the old name).
|
||||
if (!editingProfile && maskName && !renamingMask) {
|
||||
sendMotionMaskState(enabled ? "ON" : "OFF");
|
||||
}
|
||||
} else {
|
||||
@@ -414,6 +415,7 @@ export default function MotionMaskEditPane({
|
||||
nameLabel={t("masksAndZones.motionMasks.name.title")}
|
||||
nameDescription={t("masksAndZones.motionMasks.name.description")}
|
||||
placeholderName={t("masksAndZones.motionMasks.name.placeholder")}
|
||||
idDisabled={!!editingProfile && polygon.name.length > 0}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
Reference in New Issue
Block a user