From 89e089ad2561d57e8fc13a634bb74255b39bbcf4 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sun, 5 Oct 2025 02:40:38 +0100 Subject: [PATCH] refactor: render settings in main pane instead of as overlay - Move Settings component from overlay to main pane - Update Settings styling for inline display - Conditionally render Settings or ContentPanel in main pane - Remove overlay-specific styles and simplify layout --- src/components/Bookmarks.tsx | 21 ++++++++-------- src/components/Settings.tsx | 46 +++++++++++++++++------------------- src/index.css | 37 +++++++---------------------- 3 files changed, 42 insertions(+), 62 deletions(-) diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index dea521a4..b9a6faeb 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -176,7 +176,15 @@ const Bookmarks: React.FC = ({ relayPool, onLogout }) => { onOpenSettings={() => setShowSettings(true)} /> -
+
+ {showSettings ? ( + setShowSettings(false)} + isSaving={isSavingSettings} + /> + ) : ( = ({ relayPool, onLogout }) => { onHighlightClick={setSelectedHighlightId} selectedHighlightId={selectedHighlightId} /> -
+ )} +
= ({ relayPool, onLogout }) => { />
- {showSettings && ( - setShowSettings(false)} - isSaving={isSavingSettings} - /> - )} ) } diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 25bf84d4..5c6c6655 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -23,20 +23,19 @@ const Settings: React.FC = ({ settings, onSave, onClose, isSaving } return ( -
-
-
-

Settings

- -
+
+
+

Settings

+ +
-
+
-
+
-
- -
+
+
) diff --git a/src/index.css b/src/index.css index 3b8bed9d..25177eb5 100644 --- a/src/index.css +++ b/src/index.css @@ -1422,48 +1422,30 @@ body { } /* Settings Panel */ -.settings-overlay { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: rgba(0, 0, 0, 0.7); - display: flex; - justify-content: center; - align-items: center; - z-index: 1000; -} - -.settings-panel { - background: #1a1a1a; - border: 1px solid #333; - border-radius: 8px; - width: 90%; - max-width: 500px; - max-height: 80vh; - overflow: hidden; +.settings-view { display: flex; flex-direction: column; + height: 100%; + overflow: hidden; + padding: 1.5rem; } .settings-header { display: flex; justify-content: space-between; align-items: center; - padding: 1.5rem; - border-bottom: 1px solid #333; + margin-bottom: 2rem; } .settings-header h2 { margin: 0; - font-size: 1.5rem; + font-size: 1.75rem; } .settings-content { - padding: 1.5rem; overflow-y: auto; flex: 1; + margin-bottom: 2rem; } .setting-group { @@ -1511,10 +1493,9 @@ body { } .settings-footer { - padding: 1.5rem; - border-top: 1px solid #333; display: flex; - justify-content: flex-end; + justify-content: flex-start; + padding-top: 1rem; } .settings-footer .btn-primary {