From d6e679bfe33f4118b623429f3c7855c73dc53350 Mon Sep 17 00:00:00 2001 From: redth Date: Fri, 6 Feb 2026 12:22:21 -0500 Subject: [PATCH 1/2] Add mobile sidebar top-bar & flyout UI Introduce a responsive mobile sidebar: MainLayout now renders a mobile top-bar and a slide-in flyout (backdrop + panel) and manages flyout state (ToggleFlyout/CloseFlyout). SessionSidebar was refactored to support IsMobileTopBar and IsFlyoutPanel modes, a mobile hamburger/top-bar, a flyout header/close button, and unified session-creation inputs (desktop + flyout) with JS reads that handle both input IDs. Added EventCallbacks (OnToggleFlyout, OnSessionSelected) and updated CreateSession/SelectSession to clear both input variants and invoke callbacks. Moved session list rendering into a RenderFragment and adjusted persisted session UI (timestamp format, layout, resume action). Large CSS updates: MainLayout, SessionSidebar, Dashboard and Home styles include mobile-specific rules, flyout panel/backdrop, and various spacing/font tweaks. Home.razor: added copy-session-id action, debug log toggle/filter UI, improved send/queue button icons, updated placeholders and debug log handling (size and filtering). Overall this change improves mobile UX and session management consistency. --- Components/Layout/MainLayout.razor | 25 +- Components/Layout/MainLayout.razor.css | 56 +++- Components/Layout/SessionSidebar.razor | 319 +++++++++++++-------- Components/Layout/SessionSidebar.razor.css | 109 +++++++ Components/Pages/Dashboard.razor.css | 19 ++ Components/Pages/Home.razor | 47 ++- Components/Pages/Home.razor.css | 119 ++++++-- 7 files changed, 538 insertions(+), 156 deletions(-) diff --git a/Components/Layout/MainLayout.razor b/Components/Layout/MainLayout.razor index 426b2f3ca6..eda6305d52 100644 --- a/Components/Layout/MainLayout.razor +++ b/Components/Layout/MainLayout.razor @@ -1,13 +1,36 @@ @inherits LayoutComponentBase
- + +@code { + private bool flyoutOpen; + + private void ToggleFlyout() + { + flyoutOpen = !flyoutOpen; + } + + private void CloseFlyout() + { + flyoutOpen = false; + } +} diff --git a/Components/Layout/MainLayout.razor.css b/Components/Layout/MainLayout.razor.css index 896ea41174..ffa2e807b8 100644 --- a/Components/Layout/MainLayout.razor.css +++ b/Components/Layout/MainLayout.razor.css @@ -23,18 +23,64 @@ main { background: #1a1a2e; } -@media (max-width: 640.98px) { - .sidebar { - height: auto; - max-height: 40vh; - } +/* Mobile: hide desktop sidebar, show top bar + flyout */ +.desktop-only { + display: none; +} + +.mobile-only { + display: block; +} + +.mobile-top-bar { + background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%); + flex-shrink: 0; +} + +.flyout-backdrop { + display: none; + position: fixed; + inset: 0; + background: rgba(0,0,0,0.5); + z-index: 99; +} + +.flyout-backdrop.open { + display: block; +} + +.flyout-panel { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 320px; + max-width: 92vw; + background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%); + z-index: 100; + transform: translateX(-100%); + transition: transform 0.25s ease; + overflow-y: auto; +} + +.flyout-panel.open { + transform: translateX(0); } +/* Desktop: show sidebar, hide mobile elements */ @media (min-width: 641px) { .page { flex-direction: row; } + .desktop-only { + display: block; + } + + .mobile-only { + display: none !important; + } + .sidebar { width: 280px; height: 100vh; diff --git a/Components/Layout/SessionSidebar.razor b/Components/Layout/SessionSidebar.razor index 10f81d96a3..dc391ce53b 100644 --- a/Components/Layout/SessionSidebar.razor +++ b/Components/Layout/SessionSidebar.razor @@ -4,146 +4,206 @@ @inject IJSRuntime JS @inject NavigationManager Nav -