mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 17:47:37 +03:00
frontend
This commit is contained in:
parent
10bc306b33
commit
27d4c11295
@ -8,6 +8,7 @@ import {
|
|||||||
FormLabel,
|
FormLabel,
|
||||||
FormMessage,
|
FormMessage,
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@ -81,6 +82,7 @@ export default function Step1NameCamera({
|
|||||||
password: z.string().optional(),
|
password: z.string().optional(),
|
||||||
brandTemplate: z.enum(CAMERA_BRAND_VALUES).optional(),
|
brandTemplate: z.enum(CAMERA_BRAND_VALUES).optional(),
|
||||||
onvifPort: z.coerce.number().int().min(1).max(65535).optional(),
|
onvifPort: z.coerce.number().int().min(1).max(65535).optional(),
|
||||||
|
useDigestAuth: z.boolean().optional(),
|
||||||
customUrl: z
|
customUrl: z
|
||||||
.string()
|
.string()
|
||||||
.optional()
|
.optional()
|
||||||
@ -118,6 +120,7 @@ export default function Step1NameCamera({
|
|||||||
: "dahua",
|
: "dahua",
|
||||||
customUrl: wizardData.customUrl || "",
|
customUrl: wizardData.customUrl || "",
|
||||||
onvifPort: wizardData.onvifPort ?? 80,
|
onvifPort: wizardData.onvifPort ?? 80,
|
||||||
|
useDigestAuth: wizardData.useDigestAuth ?? false,
|
||||||
},
|
},
|
||||||
mode: "onChange",
|
mode: "onChange",
|
||||||
});
|
});
|
||||||
@ -330,6 +333,32 @@ export default function Step1NameCamera({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{probeMode && (
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="useDigestAuth"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex items-start space-x-2">
|
||||||
|
<FormControl>
|
||||||
|
<Checkbox
|
||||||
|
className="size-5 text-white accent-white data-[state=checked]:bg-selected data-[state=checked]:text-white"
|
||||||
|
checked={!!field.value}
|
||||||
|
onCheckedChange={(val) => field.onChange(!!val)}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<div className="flex flex-1 flex-col space-y-1">
|
||||||
|
<FormLabel className="mb-0 text-primary-variant">
|
||||||
|
{t("cameraWizard.step1.useDigestAuth")}
|
||||||
|
</FormLabel>
|
||||||
|
<FormDescription className="mt-0">
|
||||||
|
{t("cameraWizard.step1.useDigestAuthDescription")}
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{!probeMode && (
|
{!probeMode && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<FormField
|
<FormField
|
||||||
|
|||||||
@ -191,6 +191,7 @@ export default function Step2ProbeOrSnapshot({
|
|||||||
username: wizardData.username || "",
|
username: wizardData.username || "",
|
||||||
password: wizardData.password || "",
|
password: wizardData.password || "",
|
||||||
test: false,
|
test: false,
|
||||||
|
auth_type: wizardData.useDigestAuth ? "digest" : "basic",
|
||||||
},
|
},
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -114,6 +114,7 @@ export type WizardFormData = {
|
|||||||
streams?: StreamConfig[];
|
streams?: StreamConfig[];
|
||||||
probeMode?: boolean; // true for probe, false for manual
|
probeMode?: boolean; // true for probe, false for manual
|
||||||
onvifPort?: number;
|
onvifPort?: number;
|
||||||
|
useDigestAuth?: boolean;
|
||||||
probeResult?: OnvifProbeResponse;
|
probeResult?: OnvifProbeResponse;
|
||||||
probeCandidates?: string[]; // candidate URLs from probe
|
probeCandidates?: string[]; // candidate URLs from probe
|
||||||
candidateTests?: CandidateTestMap; // test results for candidates
|
candidateTests?: CandidateTestMap; // test results for candidates
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user