diff --git a/apps/web/src/pages/Shell.tsx b/apps/web/src/pages/Shell.tsx index 2f9b136..e846e08 100644 --- a/apps/web/src/pages/Shell.tsx +++ b/apps/web/src/pages/Shell.tsx @@ -72,10 +72,7 @@ import { AvatarStyleProvider, BotAvatar, Button, - DropdownMenu, - DropdownMenuContent, DropdownMenuItem, - DropdownMenuTrigger, GroupAvatar, type GroupAvatarMember, InputGroup, @@ -214,6 +211,7 @@ import { } from "./shell/dialogs"; import { FullscreenComputerOverlay } from "./shell/fullscreen-computer-overlay"; import { MainConversationRow } from "./shell/main-conversation-row"; +import { PointerMenu } from "./shell/pointer-menu"; import { cleanRosterPreview, formatRosterTime, stripSpaceTitlePrefix } from "./shell/roster-format"; import { rosterRowClass } from "./shell/roster-row-style"; import { ProjectRosterRow, TeamRosterRow } from "./shell/roster-rows"; @@ -4552,43 +4550,23 @@ export function ShellPage() { ) : null} {spaceMenu ? ( - { - if (!open) closeSpaceMenu(); - }} + - {/* Invisible anchor at the pointer position, mirroring the bot menu. */} - - } - /> - { + const target = spaces.find((space) => space.id === spaceMenu.id); + if (target) setDeleteSpaceTarget(target); + setSpaceMenu(null); + }} > - { - const target = spaces.find((space) => space.id === spaceMenu.id); - if (target) setDeleteSpaceTarget(target); - setSpaceMenu(null); - }} - > - - {t`Delete space`} - - - + + {t`Delete space`} + + ) : null} {deleteTarget ? ( @@ -4679,43 +4657,24 @@ export function ShellPage() { ) : null} {sectionMenu ? ( - { - if (!open) closeSectionMenu(); - }} + - - } - /> - { + setRenameSectionTarget({ + section: sectionMenu.section, + spaceId: sectionMenu.spaceId, + }); + setSectionMenu(null); + }} > - { - setRenameSectionTarget({ - section: sectionMenu.section, - spaceId: sectionMenu.spaceId, - }); - setSectionMenu(null); - }} - > - - {t`Rename section`} - - - + + {t`Rename section`} + + ) : null} void; + children: ReactNode; +}) { + return ( + { + if (!open) onClose(); + }} + > + {/* Invisible anchor at the pointer position, mirroring the bot menu. */} + + } + /> + + {children} + + + ); +}