Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modal on dropdowns for mobile only #11993

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use modal on dropdowns for mobile only
  • Loading branch information
hawkeye217 committed Jun 15, 2024
commit 884248ced94e32a618a1ffe5b68540db802bc93e
2 changes: 1 addition & 1 deletion web/src/components/filter/CameraGroupSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export function CameraGroupRow({

{isMobile && (
<>
<DropdownMenu modal={false}>
<DropdownMenu modal={!isDesktop}>
<DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger>
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/player/VideoControls.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -242,7 +242,7 @@ export default function VideoControls({
)}
{features.playbackRate && (
<DropdownMenu
modal={false}
modal={!isDesktop}
onOpenChange={(open) => {
if (setControlsOpen) {
setControlsOpen(open);
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/settings/PolygonItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -266,7 +266,7 @@ export default function PolygonItem({

{isMobile && (
<>
<DropdownMenu modal={false}>
<DropdownMenu modal={!isDesktop}>
<DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/live/LiveCameraView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ function PtzControlPanel({
</>
)}
{(ptz?.presets?.length ?? 0) > 0 && (
<DropdownMenu modal={false}>
<DropdownMenu modal={!isDesktop}>
<DropdownMenuTrigger asChild>
<Button>
<BsThreeDotsVertical />
Expand Down
Loading