Skip to content

Commit

Permalink
non-modal dropdown menus
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed May 30, 2024
1 parent ec88752 commit c547233
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 5 deletions.
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>
<DropdownMenu modal={false}>
<DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger>
Expand Down
1 change: 1 addition & 0 deletions web/src/components/filter/ReviewFilterGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ export function CamerasFilterButton({

return (
<DropdownMenu
modal={false}
open={open}
onOpenChange={(open) => {
if (!open) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/menu/AccountSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function AccountSettings({ className }: AccountSettingsProps) {
const MenuItem = isDesktop ? DropdownMenuItem : DialogClose;

return (
<Container>
<Container modal={!isDesktop}>
<Trigger>
<Tooltip>
<TooltipTrigger asChild>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/menu/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {

return (
<>
<Container>
<Container modal={!isDesktop}>
<Trigger>
<Tooltip>
<TooltipTrigger asChild>
Expand Down
1 change: 1 addition & 0 deletions web/src/components/player/VideoControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export default function VideoControls({
)}
{features.playbackRate && (
<DropdownMenu
modal={false}
onOpenChange={(open) => {
if (setControlsOpen) {
setControlsOpen(open);
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/settings/PolygonItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default function PolygonItem({

{isMobile && (
<>
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger>
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ function CameraSelectButton({

return (
<DropdownMenu
modal={false}
open={open}
onOpenChange={(open: boolean) => {
if (!open) {
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 @@ -583,7 +583,7 @@ function PtzControlPanel({
</>
)}
{(ptz?.presets?.length ?? 0) > 0 && (
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button>
<BsThreeDotsVertical />
Expand Down

0 comments on commit c547233

Please sign in to comment.