From fe65bc6f38ae9c4d70f051ca4c02b49e3147f5e3 Mon Sep 17 00:00:00 2001 From: LyAhn Date: Fri, 3 Jul 2026 13:46:29 +0100 Subject: [PATCH] feat(settings): reorganize preferences pages Split Settings into General, Media, Updates & Setup, Storage, and AI Workspace pages so update/setup and maintenance controls are easier to reach. Move runtime check results beside the model runtime controls instead of under model location. --- src/components/SettingsModal.tsx | 157 ++++++++++++++++++------------- 1 file changed, 92 insertions(+), 65 deletions(-) diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx index 6ab464e..3a38264 100644 --- a/src/components/SettingsModal.tsx +++ b/src/components/SettingsModal.tsx @@ -6,10 +6,13 @@ import { getChangelogForVersion } from "../changelog"; import { Tooltip } from "./Tooltip"; import { TAGGER_MODELS } from "../taggerModels"; -type SettingsSection = "workspace" | "general"; +type SettingsSection = "general" | "media" | "updates" | "storage" | "workspace"; const SECTIONS: { id: SettingsSection; label: string; detail: string }[] = [ - { id: "general", label: "General", detail: "App data and diagnostics" }, + { id: "general", label: "General", detail: "Theme and notifications" }, + { id: "media", label: "Media", detail: "Playback and slideshow" }, + { id: "updates", label: "Updates & Setup", detail: "Versions, setup, and tour" }, + { id: "storage", label: "Storage", detail: "App data and maintenance" }, { id: "workspace", label: "AI Workspace", detail: "Tagging models and queue targets" }, ]; @@ -267,7 +270,7 @@ export function SettingsModal() { }, [settingsOpen, loadTaggerModelStatus, loadTaggerModel, loadTaggerAcceleration, loadTaggerThreshold, loadTaggerBatchSize, loadTaggingQueueScope, loadTaggingQueueFolderIds, setSettingsOpen]); useEffect(() => { - if (!settingsOpen || activeSection !== "general") return; + if (!settingsOpen || activeSection !== "storage") return; setVacuumResult(null); setThumbnailCleanupResult(null); void getDatabaseInfo().then(setDbInfo).catch(() => {}); @@ -289,6 +292,7 @@ export function SettingsModal() { if (!settingsOpen) return null; + const activeSectionMeta = SECTIONS.find((section) => section.id === activeSection) ?? SECTIONS[0]; const taggerReady = taggerModelStatus?.ready ?? false; const queueScopeLabel = taggingQueueScope === "all" @@ -445,8 +449,8 @@ export function SettingsModal() {
-

{activeSection === "workspace" ? "AI Workspace" : "General"}

-

{activeSection === "workspace" ? "Model setup and queue targets" : "App data and diagnostics"}

+

{activeSectionMeta.label}

+

{activeSectionMeta.detail}

{activeSection === "workspace" ? (
@@ -496,34 +500,45 @@ export function SettingsModal() { } description={TAGGER_MODELS[taggerModel].description} > -
- {taggerReady ? ( - <> +
+
+ {taggerReady ? ( + <> + + + + ) : ( - - - ) : ( - - )} + )} +
+ {taggerRuntimeProbe ? ( +
+

+ Runtime check Ready + {" "}· acceleration: {taggerRuntimeProbe.acceleration} +

+

{taggerRuntimeProbe.session.file}

+
+ ) : null}
@@ -636,15 +651,6 @@ export function SettingsModal() {

{taggerModelProgress?.current_file ?

{taggerModelProgress.current_file}

: null} {taggerModelError ?

{taggerModelError}

: null} - {taggerRuntimeProbe ? ( -
-

- Runtime check Ready - acceleration: {taggerRuntimeProbe.acceleration} -

-

{taggerRuntimeProbe.session.file}

-
- ) : null}
@@ -766,6 +772,8 @@ export function SettingsModal() {
) : (
+ {activeSection === "general" ? ( + <> + + + + + + + + + + ) : null} + + {activeSection === "media" ? ( + <> + + ) : null} + + {activeSection === "updates" ? ( + <> - + + ) : null} + + {activeSection === "storage" ? ( + <> + - - - - - - @@ -1151,6 +1176,8 @@ export function SettingsModal() { + + ) : null}
)}