From 9ec847acb31d20fcd322f72713868b3f240bbda8 Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 28 Oct 2026 12:56:43 +0100 Subject: [PATCH] feat: connection section for mobile --- .../ConnectionSection/ConnectionSection.tsx | 13 +++++-------- .../dsp408/components/DSP408Panel/DSP408Panel.css | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/features/dsp408/components/ConnectionSection/ConnectionSection.tsx b/src/features/dsp408/components/ConnectionSection/ConnectionSection.tsx index 3732a89..f5371a5 100644 --- a/src/features/dsp408/components/ConnectionSection/ConnectionSection.tsx +++ b/src/features/dsp408/components/ConnectionSection/ConnectionSection.tsx @@ -15,12 +15,9 @@ function ConnectionPanel({ onDisconnect: () => void; }) { - const statusLabel = - isConnected(dsp) - ? 'Connected' - : dsp.isConnecting - ? 'Connecting…' - : 'Disconnected'; + const connected = isConnected(dsp); + const status = dsp.isConnecting ? 'connecting' : connected ? 'connected' : 'disconnected'; + const statusLabel = { connecting: 'Connecting…', connected: 'Connected', disconnected: 'Disconnected' }[status]; return (
@@ -36,7 +33,7 @@ function ConnectionPanel({
- + {statusLabel} @@ -65,7 +62,7 @@ function ConnectionPanel({
- {isConnected(dsp) ? ( + {connected ? ( diff --git a/src/features/dsp408/components/DSP408Panel/DSP408Panel.css b/src/features/dsp408/components/DSP408Panel/DSP408Panel.css index 8106109..654a1a2 100644 --- a/src/features/dsp408/components/DSP408Panel/DSP408Panel.css +++ b/src/features/dsp408/components/DSP408Panel/DSP408Panel.css @@ -40,7 +40,7 @@ display: none; } -@media (max-width: 768px) { +@media (max-width: 768px), (max-height: 500px) and (pointer: coarse) { .dsp-content, .dsp-loading-overlay, .app-root:has(.sidebar-rail--expanded) .dsp-content,