fix(printer-card): confirm before HA entity toggle on printer card (#1260)

Smart plugs with "Show on Printer Card" enabled appear as a chip in the
  HA-entities row below the main plug controls. One click cut power to the
  printer instantly — including mid-print — while the main Off button right
  next to it already routes through a ConfirmModal. The HA-row chip was
  added later and skipped the same gating.

  Branch on entity type: script.* entities keep firing instantly (fire-once
  triggers, not power switches — confirming each click would be annoying),
  but switch/light/anything-else entities now open a ConfirmModal first.
  Reuses the same variant="danger" + running-print warning copy as the
  existing power-off confirmation when status.state === 'RUNNING'.
This commit is contained in:
maziggy
2026-05-11 08:26:51 +02:00
parent fed8f1f74f
commit dfd9fcedf4
12 changed files with 208 additions and 148 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -26,7 +26,7 @@
<!-- Splash screens for iOS -->
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
<script type="module" crossorigin src="/assets/index-CPo_tbez.js"></script>
<script type="module" crossorigin src="/assets/index-BD3gpCvh.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BSBzgKvT.css">
</head>
<body>