mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Show filters on mobile view
This commit is contained in:
parent
b7079011e9
commit
6aae93c583
@ -15,6 +15,7 @@ import { Calendar } from "../ui/calendar";
|
||||
import { ReviewFilter } from "@/types/review";
|
||||
import { getEndOfDayTimestamp } from "@/utils/dateUtil";
|
||||
import { useFormattedTimestamp } from "@/hooks/use-date-utils";
|
||||
import { isMobile } from "react-device-detect";
|
||||
|
||||
const ATTRIBUTES = ["amazon", "face", "fedex", "license_plate", "ups"];
|
||||
|
||||
@ -122,11 +123,17 @@ function CamerasFilterButton({
|
||||
}}
|
||||
>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button className="mx-1 capitalize" variant="secondary">
|
||||
<LuVideo className=" mr-[10px]" />
|
||||
<Button
|
||||
size={isMobile ? "sm" : "default"}
|
||||
className="mx-1 capitalize"
|
||||
variant="secondary"
|
||||
>
|
||||
<LuVideo className="md:mr-[10px]" />
|
||||
<div className="hidden md:block">
|
||||
{selectedCameras == undefined
|
||||
? "All Cameras"
|
||||
: `${selectedCameras.length} Cameras`}
|
||||
</div>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
@ -205,9 +212,15 @@ function CalendarFilterButton({
|
||||
}}
|
||||
>
|
||||
<PopoverTrigger asChild>
|
||||
<Button className="mx-1" variant="secondary">
|
||||
<LuCalendar className=" mr-[10px]" />
|
||||
<Button
|
||||
size={isMobile ? "sm" : "default"}
|
||||
className="mx-1"
|
||||
variant="secondary"
|
||||
>
|
||||
<LuCalendar className="md:mr-[10px]" />
|
||||
<div className="hidden md:block">
|
||||
{day == undefined ? "Last 24 Hours" : selectedDate}
|
||||
</div>
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent>
|
||||
@ -241,9 +254,13 @@ function GeneralFilterButton({
|
||||
return (
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button className="mx-1" variant="secondary">
|
||||
<LuFilter className=" mr-[10px]" />
|
||||
Filter
|
||||
<Button
|
||||
size={isMobile ? "sm" : "default"}
|
||||
className="mx-1"
|
||||
variant="secondary"
|
||||
>
|
||||
<LuFilter className="md:mr-[10px]" />
|
||||
<div className="hidden md:block">Filter</div>
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent side="left" asChild>
|
||||
|
||||
@ -229,9 +229,7 @@ export default function EventView({
|
||||
<div className="hidden md:block">Motion</div>
|
||||
</ToggleGroupItem>
|
||||
</ToggleGroup>
|
||||
{isDesktop && (
|
||||
<ReviewFilterGroup filter={filter} onUpdateFilter={updateFilter} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex h-full overflow-hidden">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user