|
| 1 | +import LayoutGrid from "lucide-react/dist/esm/icons/layout-grid"; |
| 2 | +import SlidersHorizontal from "lucide-react/dist/esm/icons/sliders-horizontal"; |
| 3 | +import Mic from "lucide-react/dist/esm/icons/mic"; |
| 4 | +import Keyboard from "lucide-react/dist/esm/icons/keyboard"; |
| 5 | +import GitBranch from "lucide-react/dist/esm/icons/git-branch"; |
| 6 | +import TerminalSquare from "lucide-react/dist/esm/icons/terminal-square"; |
| 7 | +import FileText from "lucide-react/dist/esm/icons/file-text"; |
| 8 | +import FlaskConical from "lucide-react/dist/esm/icons/flask-conical"; |
| 9 | +import ExternalLink from "lucide-react/dist/esm/icons/external-link"; |
| 10 | +import Layers from "lucide-react/dist/esm/icons/layers"; |
| 11 | +import type { CodexSection } from "./settingsTypes"; |
| 12 | + |
| 13 | +type SettingsNavProps = { |
| 14 | + activeSection: CodexSection; |
| 15 | + onSelectSection: (section: CodexSection) => void; |
| 16 | +}; |
| 17 | + |
| 18 | +export function SettingsNav({ activeSection, onSelectSection }: SettingsNavProps) { |
| 19 | + return ( |
| 20 | + <aside className="settings-sidebar"> |
| 21 | + <button |
| 22 | + type="button" |
| 23 | + className={`settings-nav ${activeSection === "projects" ? "active" : ""}`} |
| 24 | + onClick={() => onSelectSection("projects")} |
| 25 | + > |
| 26 | + <LayoutGrid aria-hidden /> |
| 27 | + Projects |
| 28 | + </button> |
| 29 | + <button |
| 30 | + type="button" |
| 31 | + className={`settings-nav ${activeSection === "environments" ? "active" : ""}`} |
| 32 | + onClick={() => onSelectSection("environments")} |
| 33 | + > |
| 34 | + <Layers aria-hidden /> |
| 35 | + Environments |
| 36 | + </button> |
| 37 | + <button |
| 38 | + type="button" |
| 39 | + className={`settings-nav ${activeSection === "display" ? "active" : ""}`} |
| 40 | + onClick={() => onSelectSection("display")} |
| 41 | + > |
| 42 | + <SlidersHorizontal aria-hidden /> |
| 43 | + Display & Sound |
| 44 | + </button> |
| 45 | + <button |
| 46 | + type="button" |
| 47 | + className={`settings-nav ${activeSection === "composer" ? "active" : ""}`} |
| 48 | + onClick={() => onSelectSection("composer")} |
| 49 | + > |
| 50 | + <FileText aria-hidden /> |
| 51 | + Composer |
| 52 | + </button> |
| 53 | + <button |
| 54 | + type="button" |
| 55 | + className={`settings-nav ${activeSection === "dictation" ? "active" : ""}`} |
| 56 | + onClick={() => onSelectSection("dictation")} |
| 57 | + > |
| 58 | + <Mic aria-hidden /> |
| 59 | + Dictation |
| 60 | + </button> |
| 61 | + <button |
| 62 | + type="button" |
| 63 | + className={`settings-nav ${activeSection === "shortcuts" ? "active" : ""}`} |
| 64 | + onClick={() => onSelectSection("shortcuts")} |
| 65 | + > |
| 66 | + <Keyboard aria-hidden /> |
| 67 | + Shortcuts |
| 68 | + </button> |
| 69 | + <button |
| 70 | + type="button" |
| 71 | + className={`settings-nav ${activeSection === "open-apps" ? "active" : ""}`} |
| 72 | + onClick={() => onSelectSection("open-apps")} |
| 73 | + > |
| 74 | + <ExternalLink aria-hidden /> |
| 75 | + Open in |
| 76 | + </button> |
| 77 | + <button |
| 78 | + type="button" |
| 79 | + className={`settings-nav ${activeSection === "git" ? "active" : ""}`} |
| 80 | + onClick={() => onSelectSection("git")} |
| 81 | + > |
| 82 | + <GitBranch aria-hidden /> |
| 83 | + Git |
| 84 | + </button> |
| 85 | + <button |
| 86 | + type="button" |
| 87 | + className={`settings-nav ${activeSection === "codex" ? "active" : ""}`} |
| 88 | + onClick={() => onSelectSection("codex")} |
| 89 | + > |
| 90 | + <TerminalSquare aria-hidden /> |
| 91 | + Codex |
| 92 | + </button> |
| 93 | + <button |
| 94 | + type="button" |
| 95 | + className={`settings-nav ${activeSection === "features" ? "active" : ""}`} |
| 96 | + onClick={() => onSelectSection("features")} |
| 97 | + > |
| 98 | + <FlaskConical aria-hidden /> |
| 99 | + Features |
| 100 | + </button> |
| 101 | + </aside> |
| 102 | + ); |
| 103 | +} |
0 commit comments