Skip to content

An open-source, self-hosted system for apps built with web technologies.

Anchor View2 start menu natively

zohayrslileh443cb7fe24b1
diff --git a/source/client/view2/structure/desktop/taskbar/launcher/launcher.tsx b/source/client/view2/structure/desktop/taskbar/launcher/launcher.tsx
index 1a9a99e..a7f650c 100644
--- a/source/client/view2/structure/desktop/taskbar/launcher/launcher.tsx
+++ b/source/client/view2/structure/desktop/taskbar/launcher/launcher.tsx
@@ -1,13 +1,15 @@
-import { Popover } from "@heroui/react"
+import { useId } from "react"
import StartMenu from "./start-menu"
export default function () {
- return <Popover>
+ const id = useId()
- <Popover.Trigger aria-label="Start Menu" className="h-full min-w-[2.2rem] bg-danger" />
+ return <>
- <StartMenu />
+ <button type="button" popoverTarget={id} aria-label="Start Menu" className="h-full min-w-[2.2rem] bg-danger" />
- </Popover>
-}
\ No newline at end of file
+ <StartMenu id={id} />
+
+ </>
+}
diff --git a/source/client/view2/structure/desktop/taskbar/launcher/start-menu.tsx b/source/client/view2/structure/desktop/taskbar/launcher/start-menu.tsx
index 8b7644e..b567639 100644
--- a/source/client/view2/structure/desktop/taskbar/launcher/start-menu.tsx
+++ b/source/client/view2/structure/desktop/taskbar/launcher/start-menu.tsx
@@ -1,4 +1,4 @@
-import { Popover } from "@heroui/react"
+import { Surface } from "@heroui/react"
import { CSSProperties } from "react"
const position = {
@@ -19,7 +19,7 @@ const position = {
} satisfies CSSProperties
-export default function () {
+export default function ({ id }: { id: string }) {
- return <Popover.Content aria-label="Start Menu" placement="top start" style={position} className="size-80 rounded-lg">{null}</Popover.Content>
+ return <Surface id={id} popover="auto" aria-label="Start Menu" style={position} className="m-0 size-80 rounded-lg border-0 p-0 outline-none">{null}</Surface>
}