Add selection and report bottom dock

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-11-13 22:47:59 +08:00
parent 1c7d85b3a2
commit 26c0963363
5 changed files with 50 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState } from "react";
export function UtilityMenus({ onPreferences, onShortcuts }: { onPreferences: () => void; onShortcuts: () => void }) {
export function UtilityMenus({ onPreferences, onShortcuts, onToggleDock }: { onPreferences: () => void; onShortcuts: () => void; onToggleDock: () => void }) {
const [open, setOpen] = useState("");
return <div className="utility-menus">
<style>{`
@@ -21,6 +21,13 @@ export function UtilityMenus({ onPreferences, onShortcuts }: { onPreferences: ()
<span>Customize / Units calculator: P3</span>
</div>}
</button>
<button type="button" aria-expanded={open === "Windows"}
onClick={() => setOpen(previous => previous === "Windows" ? "" : "Windows")}>Windows
{open === "Windows" && <div className="dropdown" role="menu" aria-label="Windows">
<button type="button" onClick={() => { setOpen(""); onToggleDock(); }}>Selection / Report views</button>
<span>Tile / floating docks: P3</span>
</div>}
</button>
<button type="button" aria-expanded={open === "Help"}
onClick={() => setOpen(previous => previous === "Help" ? "" : "Help")}>Help
{open === "Help" && <div className="dropdown" role="menu" aria-label="Help">