mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Use modal on dropdowns for mobile only (#11993)
This commit is contained in:
parent
f1bb797fe0
commit
89a478ce0a
@ -468,7 +468,7 @@ export function CameraGroupRow({
|
|||||||
|
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={!isDesktop}>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<HiOutlineDotsVertical className="size-5" />
|
<HiOutlineDotsVertical className="size-5" />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useCallback, useMemo, useRef, useState } from "react";
|
import { useCallback, useMemo, useRef, useState } from "react";
|
||||||
import { isMobileOnly, isSafari } from "react-device-detect";
|
import { isDesktop, isMobileOnly, isSafari } from "react-device-detect";
|
||||||
import { LuPause, LuPlay } from "react-icons/lu";
|
import { LuPause, LuPlay } from "react-icons/lu";
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
@ -242,7 +242,7 @@ export default function VideoControls({
|
|||||||
)}
|
)}
|
||||||
{features.playbackRate && (
|
{features.playbackRate && (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
modal={false}
|
modal={!isDesktop}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
if (setControlsOpen) {
|
if (setControlsOpen) {
|
||||||
setControlsOpen(open);
|
setControlsOpen(open);
|
||||||
|
@ -19,7 +19,7 @@ import { LuCopy, LuPencil } from "react-icons/lu";
|
|||||||
import { FaDrawPolygon, FaObjectGroup } from "react-icons/fa";
|
import { FaDrawPolygon, FaObjectGroup } from "react-icons/fa";
|
||||||
import { BsPersonBoundingBox } from "react-icons/bs";
|
import { BsPersonBoundingBox } from "react-icons/bs";
|
||||||
import { HiOutlineDotsVertical, HiTrash } from "react-icons/hi";
|
import { HiOutlineDotsVertical, HiTrash } from "react-icons/hi";
|
||||||
import { isMobile } from "react-device-detect";
|
import { isDesktop, isMobile } from "react-device-detect";
|
||||||
import {
|
import {
|
||||||
flattenPoints,
|
flattenPoints,
|
||||||
parseCoordinates,
|
parseCoordinates,
|
||||||
@ -266,7 +266,7 @@ export default function PolygonItem({
|
|||||||
|
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={!isDesktop}>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<HiOutlineDotsVertical className="size-5" />
|
<HiOutlineDotsVertical className="size-5" />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
@ -620,7 +620,7 @@ function PtzControlPanel({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{(ptz?.presets?.length ?? 0) > 0 && (
|
{(ptz?.presets?.length ?? 0) > 0 && (
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={!isDesktop}>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button>
|
<Button>
|
||||||
<BsThreeDotsVertical />
|
<BsThreeDotsVertical />
|
||||||
|
Loading…
Reference in New Issue
Block a user