Hide SD card and door badges from printer card if printer is offline

This commit is contained in:
maziggy
2026-04-13 14:25:54 +02:00
parent 2f0cca186b
commit e33e63696a
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2462,7 +2462,7 @@ function PrinterCard({
) : null}
{/* SD Card Badge */}
{status && (
{status?.connected && (
<span
className={`flex items-center px-2 py-1 rounded-full text-xs ${
status.sdcard
@@ -2476,7 +2476,7 @@ function PrinterCard({
)}
{/* Enclosure Door Badge (X1/P1S/P2S/H2*) */}
{status && ['X1C', 'X1', 'X1E', 'P1S', 'P1P', 'P2S', 'H2D', 'H2D Pro', 'H2C', 'H2S'].includes(printer.model ?? '') && (
{status?.connected && ['X1C', 'X1', 'X1E', 'P1S', 'P1P', 'P2S', 'H2D', 'H2D Pro', 'H2C', 'H2S'].includes(printer.model ?? '') && (
<span
className={`flex items-center px-2 py-1 rounded-full text-xs ${
status.door_open