Преглед на файлове

fix(printers): equalize external tray height with regular AMS slots

On dual-nozzle printers (H2C/H2D), the External card stacked a
separate "Ext-L" / "Ext-R" caption below each tray to mark which
extruder it fed. That caption appeared on the External card only,
making the bottom row of the printer card's AMS panel visibly
taller than the row above it.

Fix: the L/R distinction now lives inside the slot's colour circle
in place of the numeric index, and the bottom caption is removed.
FilamentSlotCircle's slotNumber prop is widened to `number | string`
to carry the letter. Single-nozzle externals (one tray, no L/R
distinction) keep the numeric "1".

The Ext-L / Ext-R strings still drive the slot's "location" label
in the filament hover card, so detail context is preserved.
maziggy преди 2 месеца
родител
ревизия
3cb0433569

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
CHANGELOG.md


+ 5 - 2
frontend/src/components/FilamentSlotCircle.tsx

@@ -13,7 +13,10 @@
  *                confirmed no spool (state 9/10), "reset" for slots where
  *                confirmed no spool (state 9/10), "reset" for slots where
  *                the user cleared the assignment but the firmware hasn't
  *                the user cleared the assignment but the firmware hasn't
  *                positively confirmed emptiness. Ignored when isEmpty is false.
  *                positively confirmed emptiness. Ignored when isEmpty is false.
- *   slotNumber - 1-based slot number to display inside the circle.
+ *   slotNumber - 1-based slot number to display inside the circle. Accepts
+ *                a string for non-numeric labels (e.g. "L" / "R" for the
+ *                dual-nozzle external trays, where carrying a separate
+ *                Ext-L/Ext-R caption underneath made the row taller).
  */
  */
 
 
 interface FilamentSlotCircleProps {
 interface FilamentSlotCircleProps {
@@ -21,7 +24,7 @@ interface FilamentSlotCircleProps {
   trayType?: string | null;
   trayType?: string | null;
   isEmpty: boolean;
   isEmpty: boolean;
   emptyKind?: 'physical' | 'reset' | null;
   emptyKind?: 'physical' | 'reset' | null;
-  slotNumber: number;
+  slotNumber: number | string;
 }
 }
 
 
 function isLightFilamentColor(hex: string): boolean {
 function isLightFilamentColor(hex: string): boolean {

+ 5 - 4
frontend/src/pages/PrintersPage.tsx

@@ -5300,13 +5300,15 @@ function PrinterCard({
                               const emptyKind = getEmptySlotKind(extTray);
                               const emptyKind = getEmptySlotKind(extTray);
                               const extSlotContent = (
                               const extSlotContent = (
                                 <div className={`w-full bg-bambu-dark-secondary rounded-lg p-1 text-center ${isEmpty ? 'opacity-50' : ''} ${isExtActive ? 'ring-2 ring-bambu-green ring-offset-1 ring-offset-bambu-dark' : ''}`}>
                                 <div className={`w-full bg-bambu-dark-secondary rounded-lg p-1 text-center ${isEmpty ? 'opacity-50' : ''} ${isExtActive ? 'ring-2 ring-bambu-green ring-offset-1 ring-offset-bambu-dark' : ''}`}>
-                                  {/* Filament color circle with 1-based slot number centered inside */}
+                                  {/* Color circle: L/R inside on dual-nozzle external (replaces
+                                      the separate Ext-L/Ext-R caption that made the row taller than
+                                      regular AMS slots), 1-based slot number on single-nozzle. */}
                                   <FilamentSlotCircle
                                   <FilamentSlotCircle
                                     trayColor={extTray.tray_color}
                                     trayColor={extTray.tray_color}
                                     trayType={extTray.tray_type}
                                     trayType={extTray.tray_type}
                                     isEmpty={isEmpty}
                                     isEmpty={isEmpty}
                                     emptyKind={emptyKind}
                                     emptyKind={emptyKind}
-                                    slotNumber={slotTrayId + 1}
+                                    slotNumber={isDualNozzle ? (extTrayId === 254 ? 'L' : 'R') : slotTrayId + 1}
                                   />
                                   />
                                   <div className={`text-[9px] font-bold truncate ${isEmpty ? 'text-white/40' : 'text-white'}`}>
                                   <div className={`text-[9px] font-bold truncate ${isEmpty ? 'text-white/40' : 'text-white'}`}>
                                     {extTray.tray_type || t('ams.slotEmpty')}
                                     {extTray.tray_type || t('ams.slotEmpty')}
@@ -5322,7 +5324,6 @@ function PrinterCard({
                                       />
                                       />
                                     )}
                                     )}
                                   </div>
                                   </div>
-                                  {extLabel && <div className="text-[7px] text-white/40 mt-0.5 truncate">{extLabel}</div>}
                                 </div>
                                 </div>
                               );
                               );
 
 
@@ -5484,7 +5485,7 @@ function PrinterCard({
         {viewMode === 'expanded' && (
         {viewMode === 'expanded' && (
           <div className="mt-auto">
           <div className="mt-auto">
         {smartPlug && (
         {smartPlug && (
-          <div className="pt-4">
+          <div className="pt-3">
             <div className="flex items-center gap-2 mb-2">
             <div className="flex items-center gap-2 mb-2">
               <span className="text-[10px] uppercase tracking-wider text-bambu-gray font-medium">
               <span className="text-[10px] uppercase tracking-wider text-bambu-gray font-medium">
                 {t('printers.power', 'Power')}
                 {t('printers.power', 'Power')}

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/assets/index-CFvgt_ZD.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/assets/index-WvBaLL5O.js


+ 2 - 2
static/index.html

@@ -26,8 +26,8 @@
 
 
     <!-- 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-BgPfOybr.js"></script>
-    <link rel="stylesheet" crossorigin href="/assets/index-D4jvs18I.css">
+    <script type="module" crossorigin src="/assets/index-WvBaLL5O.js"></script>
+    <link rel="stylesheet" crossorigin href="/assets/index-CFvgt_ZD.css">
   </head>
   </head>
   <body>
   <body>
     <div id="root"></div>
     <div id="root"></div>

Някои файлове не бяха показани, защото твърде много файлове са промени