Browse Source

Show 0% wear in nozzle rack hover card (#300)

The wear field was hidden when wear was 0 because the condition
`slot.wear > 0` treated 0 the same as null/unavailable. New nozzles
showed no wear info at all. Removed the > 0 check so "Wear: 0%"
displays correctly while still hiding the field when wear is null
(non-H2C printers).
maziggy 3 months ago
parent
commit
39da463c90
2 changed files with 3 additions and 2 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 2
      frontend/src/pages/PrintersPage.tsx

+ 1 - 0
CHANGELOG.md

@@ -22,6 +22,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **Japanese Locale Complete Overhaul** — Restructured `ja.ts` from a divergent format (different key structure, 12 structural conflicts, 1,366 missing translations) to match the English/German locale structure exactly. Translated all 2,083 keys into Japanese, achieving full parity with EN/DE. Zero structural divergences, zero missing keys.
 
 ### Fixed
+- **Nozzle Rack Hides 0% Wear** ([#300](https://github.com/maziggy/bambuddy/issues/300)) — New nozzles with 0% wear showed no wear info in the hover card because the condition treated 0 the same as "not available." Now displays "Wear: 0%" correctly. The field is still hidden when the printer doesn't report wear data.
 - **H2C Nozzle Rack Shows Wrong Nozzles** ([#300](https://github.com/maziggy/bambuddy/issues/300)) — The nozzle rack included L/R nozzle heads (IDs 0, 1) alongside the actual rack slots (IDs 16–21), causing the mounted nozzle to appear docked and the last rack position (e.g., 0.6mm) to be cut off. Backend now filters to rack-only entries (id >= 2) and sorts by ID for consistent ordering.
 - **H2C Firmware Update Downloads Wrong Firmware** ([#311](https://github.com/maziggy/bambuddy/issues/311)) — H2C printers were mapped to the H2D firmware API key (`h2d`), causing firmware checks to offer H2D firmware instead of H2C firmware. H2C has its own firmware track (01.01.x.x vs H2D's 01.02.x.x). Added separate `h2c` API key mapping. Also added missing H2C/H2S entries to printer model ID and 3MF model maps.
 - **Sidebar Links Custom Icons Have Inverted Colors** ([#308](https://github.com/maziggy/bambuddy/issues/308)) — Custom uploaded icons in sidebar links had their colors inverted in dark mode due to a CSS `invert()` filter. The filter was intended for monochrome preset icons but was incorrectly applied to user-uploaded images (e.g., full-color logos). Removed the invert filter from custom icon rendering in the sidebar and the add/edit link modal.

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

@@ -530,8 +530,8 @@ function NozzleSlotHoverCard({ slot, index, children }: {
                   </span>
                 </div>
 
-                {/* Wear (hide if null/0) */}
-                {slot.wear != null && slot.wear > 0 && (
+                {/* Wear (hide if null) */}
+                {slot.wear != null && (
                   <div className="flex items-center justify-between">
                     <span className="text-[10px] uppercase tracking-wider text-bambu-gray font-medium">{t('printers.nozzleWear')}</span>
                     <span className="text-xs text-white font-semibold">{slot.wear}%</span>