mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
UI fixes (#11161)
* Don't save animated webp * Fix bad export state * Contain scroll for camera group * Use dvh
This commit is contained in:
parent
7745313cdc
commit
1c9626ecff
@ -110,6 +110,8 @@ class RecordingExporter(threading.Thread):
|
||||
f"00:{minutes}:{seconds}",
|
||||
"-i",
|
||||
preview.path,
|
||||
"-frames",
|
||||
"1",
|
||||
"-c:v",
|
||||
"libwebp",
|
||||
thumb_path,
|
||||
|
@ -282,7 +282,7 @@ function NewGroupDialog({
|
||||
}}
|
||||
>
|
||||
<Content
|
||||
className={`min-w-0 ${isMobile ? "w-full p-3 rounded-t-2xl max-h-[90%]" : "w-6/12 max-h-dvh overflow-y-auto"}`}
|
||||
className={`min-w-0 ${isMobile ? "w-full p-3 rounded-t-2xl max-h-[90%]" : "w-6/12 max-h-dvh overflow-y-hidden"}`}
|
||||
>
|
||||
<div className="flex flex-col my-4 overflow-y-auto">
|
||||
{editState === "none" && (
|
||||
@ -535,7 +535,10 @@ export function CameraGroupEdit({
|
||||
|
||||
return (
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="mt-2 space-y-6">
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="mt-2 space-y-6 overflow-y-hidden"
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name"
|
||||
@ -556,34 +559,38 @@ export function CameraGroupEdit({
|
||||
/>
|
||||
|
||||
<Separator className="flex my-2 bg-secondary" />
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="cameras"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Cameras</FormLabel>
|
||||
<FormDescription>Select cameras for this group.</FormDescription>
|
||||
{[
|
||||
...(birdseyeConfig?.enabled ? ["birdseye"] : []),
|
||||
...Object.keys(config?.cameras ?? {}),
|
||||
].map((camera) => (
|
||||
<FormControl key={camera}>
|
||||
<FilterSwitch
|
||||
isChecked={field.value && field.value.includes(camera)}
|
||||
label={camera.replaceAll("_", " ")}
|
||||
onCheckedChange={(checked) => {
|
||||
const updatedCameras = checked
|
||||
? [...(field.value || []), camera]
|
||||
: (field.value || []).filter((c) => c !== camera);
|
||||
form.setValue("cameras", updatedCameras);
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
))}
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<div className="max-h-[40dvh] overflow-y-auto">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="cameras"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Cameras</FormLabel>
|
||||
<FormDescription>
|
||||
Select cameras for this group.
|
||||
</FormDescription>
|
||||
{[
|
||||
...(birdseyeConfig?.enabled ? ["birdseye"] : []),
|
||||
...Object.keys(config?.cameras ?? {}),
|
||||
].map((camera) => (
|
||||
<FormControl key={camera}>
|
||||
<FilterSwitch
|
||||
isChecked={field.value && field.value.includes(camera)}
|
||||
label={camera.replaceAll("_", " ")}
|
||||
onCheckedChange={(checked) => {
|
||||
const updatedCameras = checked
|
||||
? [...(field.value || []), camera]
|
||||
: (field.value || []).filter((c) => c !== camera);
|
||||
form.setValue("cameras", updatedCameras);
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
))}
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Separator className="flex my-2 bg-secondary" />
|
||||
<FormField
|
||||
|
@ -138,7 +138,10 @@ export default function MobileReviewSettingsDrawer({
|
||||
{features.includes("export") && (
|
||||
<Button
|
||||
className="w-full flex justify-center items-center gap-2"
|
||||
onClick={() => setDrawerMode("export")}
|
||||
onClick={() => {
|
||||
setDrawerMode("export");
|
||||
setMode("select");
|
||||
}}
|
||||
>
|
||||
<FaArrowDown className="p-1 fill-secondary bg-secondary-foreground rounded-md" />
|
||||
Export
|
||||
|
Loading…
Reference in New Issue
Block a user