Ver Fonte

Fix Assign Spool modal clipping on SpoolBuddy display

  Added scoped CSS in SpoolBuddyAmsPage that constrains the shared
  AssignSpoolModal to 90vh with scrollable content, without modifying
  the shared component used by the main Bambuddy frontend.
maziggy há 2 meses atrás
pai
commit
1b0c97538f

+ 1 - 1
CHANGELOG.md

@@ -23,7 +23,7 @@ All notable changes to Bambuddy will be documented in this file.
 - **SpoolBuddy Swipe to Switch Printers** — Swiping left/right on the SpoolBuddy touchscreen now cycles through online printers instead of triggering browser back/forward navigation. The selected printer updates in the top bar dropdown. Requires at least two online printers; single-printer setups are unaffected.
 - **SpoolBuddy Virtual Keyboard No Longer Overlays Input Fields** — The virtual keyboard now adds temporary scroll padding to the content area when it opens, ensuring the focused input field scrolls above the keyboard instead of being hidden behind it. Fixes text entry on the SpoolBuddy Settings device tab (backend URL, API token fields).
 - **Removed Diagnostic Buttons from Write Tag Page** — Removed the "NFC Diag" and "Scale Diag" buttons from the NFC status panel on the Write Tag page. These diagnostics are accessible from the Settings page and don't belong on the tag writing flow.
-- **SpoolBuddy Assign-to-AMS Modal No Longer Clips** — The AMS slot content area in the Assign-to-AMS modal was missing overflow scrolling, causing it to clip on the small SpoolBuddy touchscreen. The content area is now scrollable.
+- **SpoolBuddy Assign Spool Modal No Longer Clips Display** — The shared Assign Spool modal overflowed off-screen on the small SpoolBuddy touchscreen, hiding the footer buttons. Added scoped CSS in the SpoolBuddy AMS page that caps the modal at 90vh with a scrollable spool list, without affecting the main Bambuddy frontend.
 - **SpoolBuddy System Tab** — Added a "System" tab to SpoolBuddy Settings showing live OS stats from the Raspberry Pi: CPU temperature, core count, load average, memory usage, disk usage, OS distro/kernel/architecture, Python version, and system uptime. Stats are collected by the daemon every heartbeat (10s) using stdlib-only reads from `/proc` and `/sys` — no additional dependencies required. Usage bars turn amber at 70% and red at 90%; CPU temperature is color-coded green/amber/red.
 
 ### Fixed

+ 28 - 12
frontend/src/pages/spoolbuddy/SpoolBuddyAmsPage.tsx

@@ -736,19 +736,35 @@ export function SpoolBuddyAmsPage() {
         );
       })()}
 
-      {/* Assign spool modal (inventory) */}
+      {/* Assign spool modal (inventory) — scoped styles constrain to viewport for small SpoolBuddy screen */}
       {assignSpoolModal && (
-        <AssignSpoolModal
-          isOpen={!!assignSpoolModal}
-          onClose={() => {
-            setAssignSpoolModal(null);
-            queryClient.invalidateQueries({ queryKey: ['spool-assignments', selectedPrinterId] });
-          }}
-          printerId={assignSpoolModal.printerId}
-          amsId={assignSpoolModal.amsId}
-          trayId={assignSpoolModal.trayId}
-          trayInfo={assignSpoolModal.trayInfo}
-        />
+        <>
+          <style>{`
+            .sb-assign-wrap .relative.max-w-2xl {
+              max-height: 90vh;
+              display: flex;
+              flex-direction: column;
+            }
+            .sb-assign-wrap .relative.max-w-2xl > .p-4.space-y-4 {
+              flex: 1 1 0;
+              min-height: 0;
+              overflow-y: auto;
+            }
+          `}</style>
+          <div className="sb-assign-wrap">
+            <AssignSpoolModal
+              isOpen={!!assignSpoolModal}
+              onClose={() => {
+                setAssignSpoolModal(null);
+                queryClient.invalidateQueries({ queryKey: ['spool-assignments', selectedPrinterId] });
+              }}
+              printerId={assignSpoolModal.printerId}
+              amsId={assignSpoolModal.amsId}
+              trayId={assignSpoolModal.trayId}
+              trayInfo={assignSpoolModal.trayInfo}
+            />
+          </div>
+        </>
       )}
 
       {/* Link spool modal (Spoolman) */}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
static/assets/index-vlxFmu1X.js


+ 1 - 1
static/index.html

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

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff