diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx new file mode 100644 index 0000000..7d21bab --- /dev/null +++ b/src/components/ui/input.tsx @@ -0,0 +1,20 @@ +import * as React from "react" +import { Input as InputPrimitive } from "@base-ui/react/input" + +import { cn } from "@/lib/utils" + +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ) +} + +export { Input } diff --git a/src/views/SettingsView.tsx b/src/views/SettingsView.tsx index 40345e6..4607392 100644 --- a/src/views/SettingsView.tsx +++ b/src/views/SettingsView.tsx @@ -1,7 +1,130 @@ -export function SettingsView() { +import { useState, type SubmitEvent } from 'react' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' +import { Button } from '@/components/ui/button' +import { DialogFooter } from '@/components/ui/dialog' + +interface SettingsViewProps { + onClose?: () => void +} + +export function SettingsView({ onClose }: SettingsViewProps) { + const [settings, setSettings] = useState({ + llmUrl: '', + llmKey: '', + sttUrl: '', + sttKey: '', + ttsUrl: '', + ttsKey: '', + mcpUrl: '', + }) + + const handleChange = (field: keyof typeof settings) => (e: React.ChangeEvent) => { + setSettings((prev) => ({ ...prev, [field]: e.target.value })) + } + + const handleSave = (e: SubmitEvent) => { + e.preventDefault() + // TODO: persist settings + onClose?.() + } + + const handleReload = () => { + window.location.reload() + } + return ( -
-

Settings coming soon.

-
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + +
) }