From e23bb8a1e464ac94f646434241a1fe0166420773 Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Fri, 18 Jul 2025 21:28:46 +0200 Subject: [PATCH 1/2] Fix logic for DeviceCard controls --- .../features/devices/components/DeviceCard.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/apps/dashboard/features/devices/components/DeviceCard.tsx b/src/apps/dashboard/features/devices/components/DeviceCard.tsx index 1ee65f8d7..50f796b88 100644 --- a/src/apps/dashboard/features/devices/components/DeviceCard.tsx +++ b/src/apps/dashboard/features/devices/components/DeviceCard.tsx @@ -130,7 +130,8 @@ const DeviceCard = ({ device }: DeviceCardProps) => { getDeviceIcon(device) ), [ device ]); - const canControl = device.ServerId && device.NowPlayingItem && device.SupportsRemoteControl; + const canControl = device.ServerId && device.SupportsRemoteControl; + const isPlayingMedia = !!device.NowPlayingItem; return ( @@ -219,7 +220,7 @@ const DeviceCard = ({ device }: DeviceCardProps) => { )} - {canControl && ( + {canControl && isPlayingMedia && ( <> {device.PlayState?.IsPaused ? : } @@ -227,14 +228,15 @@ const DeviceCard = ({ device }: DeviceCardProps) => { - - - )} - + {isPlayingMedia && ( + + )} + {canControl && ( + )} {device.UserName && ( From e6aeade223ba31a016d953312f2895ca4c30255e Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Fri, 18 Jul 2025 21:42:32 +0200 Subject: [PATCH 2/2] Address review feedback --- .../features/devices/components/DeviceCard.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/apps/dashboard/features/devices/components/DeviceCard.tsx b/src/apps/dashboard/features/devices/components/DeviceCard.tsx index 50f796b88..872857f88 100644 --- a/src/apps/dashboard/features/devices/components/DeviceCard.tsx +++ b/src/apps/dashboard/features/devices/components/DeviceCard.tsx @@ -230,12 +230,15 @@ const DeviceCard = ({ device }: DeviceCardProps) => { )} - {isPlayingMedia && ( - - )} - {canControl && ( - - + {isPlayingMedia && ( + + + + )} + {canControl && ( + + + )}