add keyboard shortcut (mod+,) to open settings dialog

This commit is contained in:
David Hill
2026-01-20 22:02:25 +00:00
committed by opencode
parent a0636fcd50
commit 80dc74a0ec

View File

@@ -831,6 +831,13 @@ export default function Layout(props: ParentProps) {
category: "Server", category: "Server",
onSelect: () => openServer(), onSelect: () => openServer(),
}, },
{
id: "settings.open",
title: "Open settings",
category: "Settings",
keybind: "mod+comma",
onSelect: () => openSettings(),
},
{ {
id: "session.previous", id: "session.previous",
title: "Previous session", title: "Previous session",
@@ -2052,9 +2059,13 @@ export default function Layout(props: ParentProps) {
</DragDropProvider> </DragDropProvider>
</div> </div>
<div class="shrink-0 w-full pt-3 pb-3 flex flex-col items-center gap-2"> <div class="shrink-0 w-full pt-3 pb-3 flex flex-col items-center gap-2">
<Tooltip placement={sidebarProps.mobile ? "bottom" : "right"} value="Settings"> <TooltipKeybind
placement={sidebarProps.mobile ? "bottom" : "right"}
title="Settings"
keybind={command.keybind("settings.open")}
>
<IconButton icon="settings-gear" variant="ghost" size="large" onClick={openSettings} /> <IconButton icon="settings-gear" variant="ghost" size="large" onClick={openSettings} />
</Tooltip> </TooltipKeybind>
<Tooltip placement={sidebarProps.mobile ? "bottom" : "right"} value="Help"> <Tooltip placement={sidebarProps.mobile ? "bottom" : "right"} value="Help">
<IconButton <IconButton
icon="help" icon="help"