aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/SettingsPage.tsx
blob: 5267665ae0550140908d37cae04ec74e1011f58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import React, { useState } from "react";
import { SystemPromptsSettings } from "./settings/SystemPromptsSettings";

type SettingsSection = "system-prompts";

interface SettingsPageProps {
  onClose: () => void;
}

export function SettingsPage({ onClose }: SettingsPageProps) {
  const [activeSection, setActiveSection] =
    useState<SettingsSection>("system-prompts");

  return (
    <div className="settings-overlay">
      {/* Header — matches the main app header height/style */}
      <div className="settings-header">
        <div className="settings-header-left">
          <span className="settings-title">\u2699 Settings</span>
        </div>
        <button
          className="settings-close"
          onClick={onClose}
          title="Close settings"
        >
          \u00d7
        </button>
      </div>

      <div className="settings-body">
        {/* Side nav */}
        <nav className="settings-nav">
          <button
            className={`settings-nav-item${
              activeSection === "system-prompts" ? " active" : ""
            }`}
            onClick={() => setActiveSection("system-prompts")}
          >
            System Prompts
          </button>
          {/* Future sections added here */}
        </nav>

        {/* Content */}
        <div className="settings-content">
          {activeSection === "system-prompts" && <SystemPromptsSettings />}
        </div>
      </div>
    </div>
  );
}