mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-17 22:24:29 +00:00
app: fix portal positioning for sidebar menus and tooltips by removing conditional mount logic
This commit is contained in:
@@ -1960,7 +1960,7 @@ export default function Layout(props: ParentProps) {
|
|||||||
}}
|
}}
|
||||||
aria-label={language.t("common.moreOptions")}
|
aria-label={language.t("common.moreOptions")}
|
||||||
/>
|
/>
|
||||||
<DropdownMenu.Portal mount={!panelProps.mobile ? state.nav : undefined}>
|
<DropdownMenu.Portal>
|
||||||
<DropdownMenu.Content class="mt-1">
|
<DropdownMenu.Content class="mt-1">
|
||||||
<DropdownMenu.Item onSelect={() => showEditProjectDialog(p())}>
|
<DropdownMenu.Item onSelect={() => showEditProjectDialog(p())}>
|
||||||
<DropdownMenu.ItemLabel>{language.t("common.edit")}</DropdownMenu.ItemLabel>
|
<DropdownMenu.ItemLabel>{language.t("common.edit")}</DropdownMenu.ItemLabel>
|
||||||
|
|||||||
@@ -163,7 +163,6 @@ const SessionHoverPreview = (props: {
|
|||||||
gutter={16}
|
gutter={16}
|
||||||
shift={-2}
|
shift={-2}
|
||||||
trigger={props.trigger}
|
trigger={props.trigger}
|
||||||
mount={!props.mobile ? props.nav() : undefined}
|
|
||||||
open={props.hoverSession() === props.session.id}
|
open={props.hoverSession() === props.session.id}
|
||||||
onOpenChange={(open) => props.setHoverSession(open ? props.session.id : undefined)}
|
onOpenChange={(open) => props.setHoverSession(open ? props.session.id : undefined)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ const ProjectTile = (props: {
|
|||||||
>
|
>
|
||||||
<ProjectIcon project={props.project} notify />
|
<ProjectIcon project={props.project} notify />
|
||||||
</ContextMenu.Trigger>
|
</ContextMenu.Trigger>
|
||||||
<ContextMenu.Portal mount={!props.mobile ? props.nav() : undefined}>
|
<ContextMenu.Portal>
|
||||||
<ContextMenu.Content>
|
<ContextMenu.Content>
|
||||||
<ContextMenu.Item onSelect={() => props.showEditProjectDialog(props.project)}>
|
<ContextMenu.Item onSelect={() => props.showEditProjectDialog(props.project)}>
|
||||||
<ContextMenu.ItemLabel>{props.language.t("common.edit")}</ContextMenu.ItemLabel>
|
<ContextMenu.ItemLabel>{props.language.t("common.edit")}</ContextMenu.ItemLabel>
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const WorkspaceActions = (props: {
|
|||||||
aria-label={props.language.t("common.moreOptions")}
|
aria-label={props.language.t("common.moreOptions")}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<DropdownMenu.Portal mount={!props.mobile ? props.nav() : undefined}>
|
<DropdownMenu.Portal>
|
||||||
<DropdownMenu.Content
|
<DropdownMenu.Content
|
||||||
onCloseAutoFocus={(event) => {
|
onCloseAutoFocus={(event) => {
|
||||||
if (!props.pendingRename()) return
|
if (!props.pendingRename()) return
|
||||||
|
|||||||
Reference in New Issue
Block a user