diff --git a/src/components/SettingsDialog.tsx b/src/components/SettingsDialog.tsx index adb03ef..81f46b2 100644 --- a/src/components/SettingsDialog.tsx +++ b/src/components/SettingsDialog.tsx @@ -7,9 +7,13 @@ interface Props { onClose: () => void; } +type Category = "appearance" | "editor" | "files" | "shortcuts" | "advanced"; + export function SettingsDialog({ onClose }: Props) { const t = useT(); const [locale, setLocale] = useLocale(); + const [tab, setTab] = useState("appearance"); + const fontSize = useAppStore((s) => s.fontSize); const proseMaxWidth = useAppStore((s) => s.proseMaxWidth); const autosaveMs = useAppStore((s) => s.autosaveMs); @@ -61,6 +65,14 @@ export function SettingsDialog({ onClose }: Props) { setSettings(patch); // live-apply } + const categories: { id: Category; label: string }[] = [ + { id: "appearance", label: t("settings.catAppearance") }, + { id: "editor", label: t("settings.catEditor") }, + { id: "files", label: t("settings.catFiles") }, + { id: "shortcuts", label: t("settings.shortcuts") }, + { id: "advanced", label: t("settings.catAdvanced") }, + ]; + return (
e.stopPropagation()} - className="w-[480px] max-w-[92vw] rounded-lg shadow-2xl bg-canvas-light dark:bg-canvas-dark border border-black/10 dark:border-white/15 p-5" + className="mk-settings w-[760px] max-w-[94vw] h-[560px] max-h-[88vh] rounded-xl overflow-hidden flex flex-col" > -
{t("settings.title")}
- -
- - commit({ fontSize: Number(e.target.value) })} - className="flex-1" - /> - + {/* Header */} +
+
+ {t("settings.title")} +
+ +
- - commit({ proseMaxWidth: Number(e.target.value) })} - className="flex-1" - /> - + {/* Body: category nav + content pane */} +
+ - - commit({ autosaveMs: Number(e.target.value) })} - className="flex-1" - /> - +
+ + + commit({ fontSize: Number(e.target.value) })} + className="w-full" + /> + - - commit({ imagePasteDir: e.target.value })} - placeholder="assets" - className="flex-1 px-2 py-1 rounded border border-black/10 dark:border-white/20 bg-transparent outline-none focus:border-blue-500" - /> - + + commit({ proseMaxWidth: Number(e.target.value) })} + className="w-full" + /> + - - - + + + - - - + + + + - - - - - - - + - - - - - - - - - - + + commit({ imagePasteDir: e.target.value })} + placeholder="assets" + className="mk-settings-input w-[180px] px-2 py-1 text-[12px]" + /> + + - -