mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-30 10:37:42 +03:00
fix types
This commit is contained in:
parent
773911e036
commit
2c3196b491
@ -98,7 +98,7 @@ export default function CreateTriggerDialog({
|
|||||||
.number()
|
.number()
|
||||||
.min(0, t("triggers.dialog.form.threshold.error.min"))
|
.min(0, t("triggers.dialog.form.threshold.error.min"))
|
||||||
.max(1, t("triggers.dialog.form.threshold.error.max")),
|
.max(1, t("triggers.dialog.form.threshold.error.max")),
|
||||||
actions: z.array(z.enum(["alert", "notification"])),
|
actions: z.array(z.enum(["notification"])),
|
||||||
});
|
});
|
||||||
|
|
||||||
const form = useForm<z.infer<typeof formSchema>>({
|
const form = useForm<z.infer<typeof formSchema>>({
|
||||||
@ -346,13 +346,13 @@ export default function CreateTriggerDialog({
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
checked={form
|
checked={form
|
||||||
.watch("actions")
|
.watch("actions")
|
||||||
.includes(action as "alert" | "notification")}
|
.includes(action as TriggerAction)}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
const currentActions = form.getValues("actions");
|
const currentActions = form.getValues("actions");
|
||||||
if (checked) {
|
if (checked) {
|
||||||
form.setValue("actions", [
|
form.setValue("actions", [
|
||||||
...currentActions,
|
...currentActions,
|
||||||
action as "alert" | "notification",
|
action as TriggerAction,
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
form.setValue(
|
form.setValue(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user