From 24a5c5a1df14d1c828ddd739e30e4f7254961a0f Mon Sep 17 00:00:00 2001 From: jarves Date: Wed, 17 Jun 2026 15:28:51 +0000 Subject: [PATCH] feat: two-column Settings layout with always-visible subsections --- app/frontend/src/App.css | 54 ++ app/frontend/src/components/Settings.jsx | 969 ++++++++++++----------- 2 files changed, 542 insertions(+), 481 deletions(-) diff --git a/app/frontend/src/App.css b/app/frontend/src/App.css index 343cfd7..77ef901 100644 --- a/app/frontend/src/App.css +++ b/app/frontend/src/App.css @@ -2696,6 +2696,60 @@ html[data-theme="dark"] .collapsible-card:hover { line-height: 1.5; } +/* --- Settings Two Column Layout --- */ +.settings-two-column { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20px; + margin-bottom: 20px; +} + +.settings-column { + display: flex; + flex-direction: column; + gap: 16px; +} + +.settings-subsection { + background: var(--md-sys-color-surface); + border: 1px solid var(--md-sys-color-card-border); + border-radius: 16px; + padding: 20px; + backdrop-filter: var(--glass-blur); + -webkit-backdrop-filter: var(--glass-blur); + box-shadow: var(--glass-shadow); + transition: box-shadow 0.3s ease, border-color 0.3s ease; +} + +.settings-subsection:hover { + box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08); + border-color: rgba(15, 23, 42, 0.12); +} + +html[data-theme="dark"] .settings-subsection:hover { + box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); + border-color: rgba(255, 255, 255, 0.08); +} + +.settings-subsection-title { + display: flex; + align-items: center; + gap: 10px; + font-size: 0.9rem; + font-weight: 600; + color: var(--md-sys-color-on-surface); + margin-bottom: 16px; + padding-bottom: 12px; + border-bottom: 1px solid var(--border-color); +} + +/* --- Responsive: Stack on mobile --- */ +@media (max-width: 900px) { + .settings-two-column { + grid-template-columns: 1fr; + } +} + /* --- Responsive Adjustments --- */ @media (max-width: 600px) { .hardware-tier-badge { diff --git a/app/frontend/src/components/Settings.jsx b/app/frontend/src/components/Settings.jsx index 294abb8..68fa820 100644 --- a/app/frontend/src/components/Settings.jsx +++ b/app/frontend/src/components/Settings.jsx @@ -315,205 +315,209 @@ function Settings({ color="#3b82f6" /> - -
-
-
- Resolution - - {constraints.width >= 1024 ? "SDXL" : "SD 1.5"} - +
+ {/* Left Column */} +
+ {/* Size & Shape */} +
+
+ + Size & Shape
-
- {["sd15", "sdxl"].map((mode) => ( - - ))} +
+
+
+ Resolution + + {constraints.width >= 1024 ? "SDXL" : "SD 1.5"} + +
+
+ {["sd15", "sdxl"].map((mode) => ( + + ))} +
+
+ +
+
+ Aspect Ratio +
+
+ {ASPECT_RATIOS.map((ratio) => { + const isSDXL = constraints.width >= 1024 && !isSD15OrCustom; + const rw = isSDXL ? ratio.sdxl_width : ratio.width; + const rh = isSDXL ? ratio.sdxl_height : ratio.height; + const isActive = Math.abs(constraints.width - rw) < 10 && Math.abs(constraints.height - rh) < 10; + return ( + + ); + })} +
+
+ +
+
+ + updateConstraint("width", Math.round(parseInt(e.target.value) / 64) * 64)} + min="64" + max="2048" + step="64" + /> +
+
+ + updateConstraint("height", Math.round(parseInt(e.target.value) / 64) * 64)} + min="64" + max="2048" + step="64" + /> +
+
-
-
- Aspect Ratio + {/* Quality & Speed */} +
+
+ + Quality & Speed
-
- {ASPECT_RATIOS.map((ratio) => { - const isSDXL = constraints.width >= 1024 && !isSD15OrCustom; - const rw = isSDXL ? ratio.sdxl_width : ratio.width; - const rh = isSDXL ? ratio.sdxl_height : ratio.height; - const isActive = Math.abs(constraints.width - rw) < 10 && Math.abs(constraints.height - rh) < 10; - return ( +
+
+
+ Detail Steps + {constraints.steps} +
+ updateConstraint("steps", parseInt(e.target.value))} + min="1" + max={isOpenVinoNpu ? "8" : "60"} + /> + + {isOpenVinoNpu + ? "LCM OpenVINO: 1-8 fast steps" + : "More steps = sharper details, longer time"} + +
+ +
+ +
+ updateConstraint("seed", parseInt(e.target.value) || -1)} + placeholder="-1 for random" + style={{ flex: 1 }} + /> - ); - })} +
+
+
-
-
- - updateConstraint("width", Math.round(parseInt(e.target.value) / 64) * 64)} - min="64" - max="2048" - step="64" - /> + {/* Right Column */} +
+ {/* Memory Optimizations */} +
+
+ + Memory Optimizations
-
- - updateConstraint("height", Math.round(parseInt(e.target.value) / 64) * 64)} - min="64" - max="2048" - step="64" +
+ updateConstraint("vaeTiling", v)} + label="VAE Tiling" + description="Process image in tiles to save VRAM" + /> + updateConstraint("vaeOnCpu", v)} + label="VAE on CPU" + description="Run decoder on CPU if GPU OOM" + /> + updateConstraint("useFlashAttn", v)} + label="Flash Attention" + description="Faster attention with less memory" />
-
- - -
-
-
- Detail Steps - {constraints.steps} + {/* Backend & Acceleration */} +
+
+ + Backend & Acceleration
- updateConstraint("steps", parseInt(e.target.value))} - min="1" - max={isOpenVinoNpu ? "8" : "60"} - /> - - {isOpenVinoNpu - ? "LCM OpenVINO: 1-8 fast steps" - : "More steps = sharper details, longer time"} - -
- -
- -
- updateConstraint("seed", parseInt(e.target.value) || -1)} - placeholder="-1 for random" - style={{ flex: 1 }} - /> - +
+
+
+ Accelerator +
+
+ {availableBackends.map((b) => ( + + ))} +
+
- - - -
- updateConstraint("vaeTiling", v)} - label="VAE Tiling" - description="Process image in tiles to save VRAM" - /> - updateConstraint("vaeOnCpu", v)} - label="VAE on CPU" - description="Run decoder on CPU if GPU OOM" - /> - updateConstraint("useFlashAttn", v)} - label="Flash Attention" - description="Faster attention with less memory" - /> -
-
- - -
-
-
- Accelerator -
-
- {availableBackends.map((b) => ( - - ))} -
-
-
-
+
); @@ -527,312 +531,315 @@ function Settings({ color="#8b5cf6" /> - -
-
- -