From a5627ef860ab4b6325127e7531a9a739c0393dd0 Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Tue, 14 Apr 2026 00:49:54 -0400 Subject: [PATCH] style: enhance media button titles in DeviceDetailOverlay and StatusPage for better clarity --- src/app/components/DeviceDetailOverlay.tsx | 33 +++++++++++------- src/app/components/StatusPage.tsx | 40 ++++++++++++---------- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/app/components/DeviceDetailOverlay.tsx b/src/app/components/DeviceDetailOverlay.tsx index 472ffa4..517504a 100644 --- a/src/app/components/DeviceDetailOverlay.tsx +++ b/src/app/components/DeviceDetailOverlay.tsx @@ -326,19 +326,26 @@ export default function DeviceDetailOverlay({
- {mediaSet.files.slice(0, 5).map((file, index) => ( - - ))} + {mediaSet.files.slice(0, 5).map((file, index) => { + // Attempt to extract a title from the filename, fallback to filename + // Example: /path/to/Game Disk.d64 or /path/to/disk1.d64 + const fileName = file.split('/').pop() || file; + // If you have a title mapping, replace this logic + const title = fileName.replace(/\.[^.]+$/, ''); + return ( + + ); + })}
)} diff --git a/src/app/components/StatusPage.tsx b/src/app/components/StatusPage.tsx index 1420ebd..0e29e4e 100644 --- a/src/app/components/StatusPage.tsx +++ b/src/app/components/StatusPage.tsx @@ -162,25 +162,29 @@ export default function StatusPage({ config, setConfig }: StatusPageProps) { } return (
- {mediaSet.map((file, idx) => ( - - ))} + }} + > + {`${idx + 1}: ${title}`} + + ); + })}
); })()}