From f05067c029da1ab219b152d82520cc1692d76e23 Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Sun, 14 Jun 2026 03:36:03 -0400 Subject: [PATCH] style(DeviceCard): enhance layout and styling for device details --- src/app/components/DeviceDetailOverlay.tsx | 107 +++++++++++---------- 1 file changed, 56 insertions(+), 51 deletions(-) diff --git a/src/app/components/DeviceDetailOverlay.tsx b/src/app/components/DeviceDetailOverlay.tsx index 6830db9..6253ea2 100644 --- a/src/app/components/DeviceDetailOverlay.tsx +++ b/src/app/components/DeviceDetailOverlay.tsx @@ -176,7 +176,7 @@ function DeviceCard({ device, config, setConfig, isActive, onBrowsingChange }: D return ( <> -
+
{!device.physical && (
@@ -191,27 +191,27 @@ function DeviceCard({ device, config, setConfig, isActive, onBrowsingChange }: D )}
- -
+ +
{device.type.charAt(0).toUpperCase() + device.type.slice(1)}
- + updateDeviceSetting([...getDevicePath(), 'name'], v)} onClear={() => updateDeviceSetting([...getDevicePath(), 'name'], '')} - className="px-3 py-2 border border-neutral-300 rounded-lg" + className="px-3 py-2.5 bg-neutral-100 border-0 rounded-xl text-sm" containerClassName="w-full" />
{!device.physical && <>
- +
updateDeviceSetting([...getDevicePath(), 'base_url'], v)} onClear={() => updateDeviceSetting([...getDevicePath(), 'base_url'], '')} containerClassName="flex-1" - className="px-3 py-2 border border-neutral-300 rounded-lg" + className="px-3 py-2.5 bg-neutral-100 border-0 rounded-xl text-sm" />
- +
{mediaSetFiles && ( @@ -279,7 +279,7 @@ function DeviceCard({ device, config, setConfig, isActive, onBrowsingChange }: D (deviceData.base_url ?? '').includes('://') || (deviceData.url ?? '').includes('://')) && (
- +
updateDeviceSetting([...getDevicePath(), 'cache'], v)} onClear={() => updateDeviceSetting([...getDevicePath(), 'cache'], '')} containerClassName="flex-1" - className="px-3 py-2 border border-neutral-300 rounded-lg" + className="px-3 py-2.5 bg-neutral-100 border-0 rounded-xl text-sm" />
@@ -305,12 +305,12 @@ function DeviceCard({ device, config, setConfig, isActive, onBrowsingChange }: D {device.physical ? {(deviceData.mode ?? 0) === 0 ? 'Read Only' : 'Write Enabled'} - :
- {([0, 1] as const).map((val, i) => ( + :
+ {([0, 1] as const).map((val) => ( @@ -322,20 +322,20 @@ function DeviceCard({ device, config, setConfig, isActive, onBrowsingChange }: D {deviceData.baud !== undefined && (
- + updateDeviceSetting([...getDevicePath(), 'baud'], parseInt(v))} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" + className="w-full px-3 py-2.5 bg-neutral-100 border-0 rounded-xl text-sm" />
)}
-
-

Device ID

- {device.id} +
+

Device ID

+ {device.id}
@@ -395,60 +395,65 @@ export default function DeviceDetailOverlay({ return ( - +
e.stopPropagation()} + transition={{ type: 'spring', damping: 28, stiffness: 280 }} + className="fixed inset-0 bg-white/80 backdrop-blur-md flex flex-col overflow-hidden" > {/* ── Header ── */} -
-
- - -
+
+
- {activeDevice.number} + {activeDevice.number} {activeDevice.physical && ( - + Physical )}
-
+
+

+ {activeDevice.name ?? `Device ${activeDevice.number}`} +

+

{activeDevice.type}

+
+ +
{devices.length > 1 && ( - + {activeIndex + 1} / {devices.length} )} - +
{showCommandMenu && ( -
+
- +
); }