diff --git a/app/frontend/src/App.css b/app/frontend/src/App.css index 43efee7..343cfd7 100644 --- a/app/frontend/src/App.css +++ b/app/frontend/src/App.css @@ -2544,43 +2544,70 @@ html[data-theme="dark"] .collapsible-card:hover { .settings-section-header { display: flex; align-items: center; - gap: 10px; - margin-bottom: 20px; - padding-bottom: 12px; - border-bottom: 1px solid var(--border-color); + gap: 14px; + margin: 32px 0 20px 0; + padding: 16px 20px; + border-radius: 14px; + background: var(--md-sys-color-surface); + border: 1px solid var(--md-sys-color-card-border); + border-left: 4px solid; + backdrop-filter: var(--glass-blur); + -webkit-backdrop-filter: var(--glass-blur); + box-shadow: var(--glass-shadow); +} + +.settings-section-icon { + width: 44px; + height: 44px; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; } .settings-section-title { - font-size: 1.1rem; + font-size: 1.15rem; font-weight: 700; color: var(--md-sys-color-on-surface); + flex: 1; } .settings-section-count { font-size: 0.75rem; - padding: 3px 10px; + padding: 4px 12px; border-radius: 999px; - background: var(--md-sys-color-primary-container); - color: var(--md-sys-color-on-primary-container); + background: var(--md-sys-color-surface-variant); + color: var(--md-sys-color-on-surface-variant); font-weight: 600; + border: 1px solid var(--border-color); } -/* --- Settings Grid Layout --- */ +/* --- Collapsible Header Badge --- */ +.collapsible-header-badge { + font-size: 0.7rem; + padding: 2px 10px; + border-radius: 999px; + margin-left: 10px; + font-weight: 700; + vertical-align: middle; +} + +.collapsible-header-right { + display: flex; + align-items: center; + gap: 12px; +} + +/* --- Settings Grid (Single Column) --- */ .settings-grid { - display: grid; - grid-template-columns: 1fr; + display: flex; + flex-direction: column; gap: 0; - max-width: 800px; + max-width: 900px; margin: 0 auto; } -@media (min-width: 900px) { - .settings-grid { - grid-template-columns: 1fr 1fr; - gap: 20px; - } -} - /* --- Premium Toggle Switch --- */ .premium-toggle { display: flex; @@ -2698,9 +2725,18 @@ html[data-theme="dark"] .collapsible-card:hover { padding: 0 16px 16px; } - .settings-tab { - padding: 8px 16px; - font-size: 0.85rem; + .settings-section-header { + padding: 12px 16px; + margin: 24px 0 16px 0; + } + + .settings-section-icon { + width: 36px; + height: 36px; + } + + .settings-section-title { + font-size: 1rem; } } diff --git a/app/frontend/src/components/Settings.jsx b/app/frontend/src/components/Settings.jsx index 2976d1a..294abb8 100644 --- a/app/frontend/src/components/Settings.jsx +++ b/app/frontend/src/components/Settings.jsx @@ -2,7 +2,8 @@ import React, { memo, useEffect, useState, useCallback } from "react"; import { Crop, Sliders, Cpu, Info, MessageSquare, SlidersHorizontal, Zap, ChevronDown, Image, Type, Settings2, Gauge, Brain, Sparkles, - Monitor, HardDrive, MemoryStick, Thermometer, Hash, Layers + Monitor, HardDrive, MemoryStick, Thermometer, Hash, Layers, + ChevronRight, Box, Wand2, Lightbulb, RotateCcw, Check } from "lucide-react"; import { stopServer, formatBytes, getLlmStatus } from "../services/api"; @@ -23,7 +24,7 @@ const isSD15OrCustomModel = (modelName) => { }; // ─── Collapsible Card Component ─── -function CollapsibleCard({ icon: Icon, title, subtitle, children, defaultExpanded = true, id, onToggle }) { +function CollapsibleCard({ icon: Icon, title, subtitle, children, defaultExpanded = false, id, badge, badgeColor }) { const [isExpanded, setIsExpanded] = useState(() => { const saved = localStorage.getItem(`settings_card_${id}`); return saved !== null ? saved === "true" : defaultExpanded; @@ -33,8 +34,7 @@ function CollapsibleCard({ icon: Icon, title, subtitle, children, defaultExpande const newState = !isExpanded; setIsExpanded(newState); localStorage.setItem(`settings_card_${id}`, String(newState)); - onToggle?.(id, newState); - }, [isExpanded, id, onToggle]); + }, [isExpanded, id]); return (
@@ -49,14 +49,29 @@ function CollapsibleCard({ icon: Icon, title, subtitle, children, defaultExpande
-
{title}
+
+ {title} + {badge && ( + + {badge} + + )} +
{subtitle &&
{subtitle}
}
- +
+ +
{isExpanded && (
@@ -72,9 +87,9 @@ function HardwareTierBadge({ specs }) { if (!specs?.tier) return null; const tierConfig = { - high: { icon: "🚀", label: "High-End PC", color: "tier-high" }, - mid: { icon: "⚖️", label: "Balanced PC", color: "tier-mid" }, - low: { icon: "🥔", label: "Potato PC", color: "tier-low" }, + high: { icon: "🚀", label: "High-End PC", color: "tier-high", accent: "#22c55e" }, + mid: { icon: "⚖️", label: "Balanced PC", color: "tier-mid", accent: "#3b82f6" }, + low: { icon: "🥔", label: "Potato PC", color: "tier-low", accent: "#f59e0b" }, }; const tier = tierConfig[specs.tier] || tierConfig.low; @@ -109,40 +124,8 @@ function HardwareTierBadge({ specs }) { ); } -// ─── Section Tabs Component ─── -function SectionTabs({ activeTab, onTabChange }) { - const tabs = [ - { id: "image", label: "Image Generation", icon: Image }, - { id: "text", label: "Text Generation", icon: Type }, - ]; - - return ( -
-
- {tabs.map((tab) => { - const Icon = tab.icon; - const isActive = activeTab === tab.id; - return ( - - ); - })} -
-
- ); -} - // ─── Premium Toggle Component ─── -function PremiumToggle({ checked, onChange, label, description, icon: Icon }) { +function PremiumToggle({ checked, onChange, label, description }) { return (