From b3807f0f606eb862fb6ae21f383fcfa0bfdc330f Mon Sep 17 00:00:00 2001 From: Kagamine Rin Date: Fri, 29 May 2026 23:03:51 -0400 Subject: [PATCH] fix: Danger Zone collapsible in SettingsModal Previously the Danger Zone was always expanded, unlike the Image Generation and Text Generation sections which were collapsible. Now: - Danger Zone has a clickable header with warning icon + chevron - Collapsed by default (consistent with other sections) - Click to expand and reveal Clear Waveforms + Delete All buttons - Chevron rotates on expand/collapse - Red styling maintained for visual distinction This keeps the settings modal clean and uncluttered by default. --- frontend/src/components/SettingsModal.tsx | 94 +++++++++++++---------- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index 4c393ba..257eacc 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -110,6 +110,7 @@ function useGenSettings(apiPrefix: string) { export default function SettingsModal({ isOpen, onClose, onClearWaveforms, onDeleteAll, clipCount }: Props) { const [confirmDelete, setConfirmDelete] = useState(false) const [loading, setLoading] = useState(false) + const [dangerExpanded, setDangerExpanded] = useState(false) const imageGen = useGenSettings('image-gen') const textGen = useGenSettings('text-gen') @@ -287,59 +288,72 @@ export default function SettingsModal({ isOpen, onClose, onClearWaveforms, onDel {/* Danger Zone */}
-
+
+ + + + -
- {/* Clear Waveforms */} -
-
-

Clear Waveform Cache

-

Delete all cached SVGs. They regenerate on next view.

+ {dangerExpanded && ( +
+ {/* Clear Waveforms */} +
+
+

Clear Waveform Cache

+

Delete all cached SVGs. They regenerate on next view.

+
+
- -
-
+
- {/* Delete All */} -
-
-

Delete All Tracks

-

- Remove {clipCount} clip{clipCount !== 1 ? 's' : ''}. Cannot be undone. -

- {confirmDelete && ( -

- Click again to confirm permanent deletion. + {/* Delete All */} +

+
+

Delete All Tracks

+

+ Remove {clipCount} clip{clipCount !== 1 ? 's' : ''}. Cannot be undone.

- )} + {confirmDelete && ( +

+ Click again to confirm permanent deletion. +

+ )} +
+
-
-
+ )}