Parcourir la source

fix(ui): round smart-plug live wattage on printer card (#1266)

  Plugs reporting fractional watts (Kauf PLF12 / ESPHome via MQTT)
  overflowed the card width. SmartPlugCard and SwitchbarPopover
  already round the same field; only the printer-card badge was raw.
maziggy il y a 2 semaines
Parent
commit
bf2b34ebcf
4 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 2 1
      CHANGELOG.md
  2. 1 1
      frontend/src/pages/PrintersPage.tsx
  3. 0 0
      static/assets/index-J0xD4Xg0.js
  4. 1 1
      static/index.html

Fichier diff supprimé car celui-ci est trop grand
+ 2 - 1
CHANGELOG.md


+ 1 - 1
frontend/src/pages/PrintersPage.tsx

@@ -4566,7 +4566,7 @@ function PrinterCard({
                   >
                   >
                     {plugStatus.state || '?'}
                     {plugStatus.state || '?'}
                     {plugStatus.state === 'ON' && plugStatus.energy?.power != null && (
                     {plugStatus.state === 'ON' && plugStatus.energy?.power != null && (
-                      <span className="text-yellow-400 ml-1.5">· {plugStatus.energy.power}W</span>
+                      <span className="text-yellow-400 ml-1.5">· {Math.round(plugStatus.energy.power)}W</span>
                     )}
                     )}
                   </span>
                   </span>
                 )}
                 )}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
static/assets/index-J0xD4Xg0.js


+ 1 - 1
static/index.html

@@ -26,7 +26,7 @@
 
 
     <!-- Splash screens for iOS -->
     <!-- Splash screens for iOS -->
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
-    <script type="module" crossorigin src="/assets/index-V-aY7Bt-.js"></script>
+    <script type="module" crossorigin src="/assets/index-J0xD4Xg0.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-DdYV-omj.css">
     <link rel="stylesheet" crossorigin href="/assets/index-DdYV-omj.css">
   </head>
   </head>
   <body>
   <body>

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff