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 && (
|
||||
<>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenu modal={!isDesktop}>
|
||||
<DropdownMenuTrigger>
|
||||
<HiOutlineDotsVertical className="size-5" />
|
||||
</DropdownMenuTrigger>
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 {
|
||||
DropdownMenu,
|
||||
@ -242,7 +242,7 @@ export default function VideoControls({
|
||||
)}
|
||||
{features.playbackRate && (
|
||||
<DropdownMenu
|
||||
modal={false}
|
||||
modal={!isDesktop}
|
||||
onOpenChange={(open) => {
|
||||
if (setControlsOpen) {
|
||||
setControlsOpen(open);
|
||||
|
@ -19,7 +19,7 @@ import { LuCopy, LuPencil } from "react-icons/lu";
|
||||
import { FaDrawPolygon, FaObjectGroup } from "react-icons/fa";
|
||||
import { BsPersonBoundingBox } from "react-icons/bs";
|
||||
import { HiOutlineDotsVertical, HiTrash } from "react-icons/hi";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import { isDesktop, isMobile } from "react-device-detect";
|
||||
import {
|
||||
flattenPoints,
|
||||
parseCoordinates,
|
||||
@ -266,7 +266,7 @@ export default function PolygonItem({
|
||||
|
||||
{isMobile && (
|
||||
<>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenu modal={!isDesktop}>
|
||||
<DropdownMenuTrigger>
|
||||
<HiOutlineDotsVertical className="size-5" />
|
||||
</DropdownMenuTrigger>
|
||||
|
@ -620,7 +620,7 @@ function PtzControlPanel({
|
||||
</>
|
||||
)}
|
||||
{(ptz?.presets?.length ?? 0) > 0 && (
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenu modal={!isDesktop}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button>
|
||||
<BsThreeDotsVertical />
|
||||
|
Loading…
Reference in New Issue
Block a user