mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-23 19:11:14 +01:00
parent
ddfdb71783
commit
1f328be1bd
@ -22,7 +22,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
|
|||||||
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
||||||
import { TimezoneAwareCalendar } from "./ReviewActivityCalendar";
|
import { TimezoneAwareCalendar } from "./ReviewActivityCalendar";
|
||||||
import { SelectSeparator } from "../ui/select";
|
import { SelectSeparator } from "../ui/select";
|
||||||
import { isDesktop } from "react-device-detect";
|
import { isDesktop, isIOS } from "react-device-detect";
|
||||||
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
|
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
|
||||||
import SaveExportOverlay from "./SaveExportOverlay";
|
import SaveExportOverlay from "./SaveExportOverlay";
|
||||||
import { getUTCOffset } from "@/utils/dateUtil";
|
import { getUTCOffset } from "@/utils/dateUtil";
|
||||||
@ -435,15 +435,18 @@ function CustomTimeSelector({
|
|||||||
id="startTime"
|
id="startTime"
|
||||||
type="time"
|
type="time"
|
||||||
value={startClock}
|
value={startClock}
|
||||||
step="1"
|
step={isIOS ? "60" : "1"}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const clock = e.target.value;
|
const clock = e.target.value;
|
||||||
const [hour, minute, second] = clock.split(":");
|
const [hour, minute, second] = isIOS
|
||||||
|
? [...clock.split(":"), "00"]
|
||||||
|
: clock.split(":");
|
||||||
|
|
||||||
const start = new Date(startTime * 1000);
|
const start = new Date(startTime * 1000);
|
||||||
start.setHours(
|
start.setHours(
|
||||||
parseInt(hour),
|
parseInt(hour),
|
||||||
parseInt(minute),
|
parseInt(minute),
|
||||||
parseInt(second),
|
parseInt(second ?? 0),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
setRange({
|
setRange({
|
||||||
@ -497,15 +500,18 @@ function CustomTimeSelector({
|
|||||||
id="startTime"
|
id="startTime"
|
||||||
type="time"
|
type="time"
|
||||||
value={endClock}
|
value={endClock}
|
||||||
step="1"
|
step={isIOS ? "60" : "1"}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const clock = e.target.value;
|
const clock = e.target.value;
|
||||||
const [hour, minute, second] = clock.split(":");
|
const [hour, minute, second] = isIOS
|
||||||
const end = new Date(endTime * 1000);
|
? [...clock.split(":"), "00"]
|
||||||
|
: clock.split(":");
|
||||||
|
|
||||||
|
const end = new Date(startTime * 1000);
|
||||||
end.setHours(
|
end.setHours(
|
||||||
parseInt(hour),
|
parseInt(hour),
|
||||||
parseInt(minute),
|
parseInt(minute),
|
||||||
parseInt(second),
|
parseInt(second ?? 0),
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
setRange({
|
setRange({
|
||||||
|
@ -46,6 +46,7 @@ const DrawerContent = React.forwardRef<
|
|||||||
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
||||||
className,
|
className,
|
||||||
isIOS && isPWA && "pb-5",
|
isIOS && isPWA && "pb-5",
|
||||||
|
isIOS && !isPWA && "md:pb-5",
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user