diff --git a/app/src/components/views/settings-view.tsx b/app/src/components/views/settings-view.tsx index 1bf13beb..3f3373e3 100644 --- a/app/src/components/views/settings-view.tsx +++ b/app/src/components/views/settings-view.tsx @@ -2,11 +2,9 @@ import { useState } from "react"; import { useAppStore } from "@/store/app-store"; -import { useSetupStore } from "@/store/setup-store"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; -import { Settings, Keyboard, Trash2, Folder } from "lucide-react"; -import { getElectronAPI } from "@/lib/electron"; +import { Settings, Trash2, Folder } from "lucide-react"; import { Dialog, DialogContent, @@ -15,13 +13,10 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { KeyboardMap, ShortcutReferencePanel } from "@/components/ui/keyboard-map"; -// Import custom hooks import { useCliStatus } from "./settings-view/hooks/use-cli-status"; import { useScrollTracking } from "./settings-view/hooks/use-scroll-tracking"; -// Import config import { NAV_ITEMS } from "./settings-view/config/navigation"; -// Import extracted sections +import { KeyboardMapDialog } from "./settings-view/components/keyboard-map-dialog"; import { ApiKeysSection } from "./settings-view/api-keys/api-keys-section"; import { ClaudeCliStatus } from "./settings-view/cli-status/claude-cli-status"; import { CodexCliStatus } from "./settings-view/cli-status/codex-cli-status"; @@ -49,9 +44,6 @@ export function SettingsView() { moveProjectToTrash, } = useAppStore(); - const { claudeAuthStatus, codexAuthStatus, setClaudeAuthStatus, setCodexAuthStatus } = - useSetupStore(); - // Compute the effective theme for the current project const effectiveTheme = currentProject?.theme || theme; @@ -211,36 +203,10 @@ export function SettingsView() { {/* Keyboard Map Dialog */} - - - - - - Keyboard Shortcut Map - - - Visual overview of all keyboard shortcuts. Keys in color are bound - to shortcuts. Click on any shortcut below to edit it. - - - - - {/* Visual Keyboard Map */} - - - {/* Shortcut Reference - Editable */} - - - All Shortcuts Reference (Click to Edit) - - - - - - + /> {/* Delete Project Confirmation Dialog */} diff --git a/app/src/components/views/settings-view/components/keyboard-map-dialog.tsx b/app/src/components/views/settings-view/components/keyboard-map-dialog.tsx new file mode 100644 index 00000000..b69a37cb --- /dev/null +++ b/app/src/components/views/settings-view/components/keyboard-map-dialog.tsx @@ -0,0 +1,46 @@ +import { Keyboard } from "lucide-react"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { KeyboardMap, ShortcutReferencePanel } from "@/components/ui/keyboard-map"; + +interface KeyboardMapDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; +} + +export function KeyboardMapDialog({ open, onOpenChange }: KeyboardMapDialogProps) { + return ( + + + + + + Keyboard Shortcut Map + + + Visual overview of all keyboard shortcuts. Keys in color are bound to + shortcuts. Click on any shortcut below to edit it. + + + + + {/* Visual Keyboard Map */} + + + {/* Shortcut Reference - Editable */} + + + All Shortcuts Reference (Click to Edit) + + + + + + + ); +}