Browse Source

Spoolbuddy - fixed horizontal swiping

maziggy 1 month ago
parent
commit
49f3fc2964

+ 12 - 2
frontend/src/components/spoolbuddy/SpoolBuddyLayout.tsx

@@ -167,8 +167,9 @@ export function SpoolBuddyLayout() {
     touchStartRef.current = null;
     swipeLockedRef.current = false;
 
-    // Vertical swipe down from top edge → open quick menu
-    if (dy >= SWIPE_THRESHOLD && Math.abs(dy) > Math.abs(dx) && startY < 80) {
+    // Vertical swipe down from top area → open quick menu
+    // Top bar is 48px; allow starting swipe up to 120px from top to account for finger size
+    if (dy >= SWIPE_THRESHOLD && Math.abs(dy) > Math.abs(dx) && startY < 120) {
       setQuickMenuOpen(true);
       return;
     }
@@ -220,6 +221,15 @@ export function SpoolBuddyLayout() {
         onTouchStart={handleTouchStart}
         onTouchEnd={handleTouchEnd}
       >
+        {/* Pull-down handle — tap or swipe to open quick menu */}
+        <button
+          onClick={() => setQuickMenuOpen(true)}
+          className="w-full h-1.5 bg-bambu-dark-secondary flex justify-center items-center shrink-0 touch-none"
+          aria-label="Open quick menu"
+        >
+          <div className="w-8 h-0.5 rounded-full bg-zinc-600" />
+        </button>
+
         <SpoolBuddyTopBar
           selectedPrinterId={selectedPrinterId}
           onPrinterChange={setSelectedPrinterId}

File diff suppressed because it is too large
+ 0 - 0
static/assets/index-CA19cW_f.css


File diff suppressed because it is too large
+ 0 - 0
static/assets/index-Cb2GmT4j.js


File diff suppressed because it is too large
+ 0 - 0
static/assets/index-nqJ5Rq6m.css


+ 2 - 2
static/index.html

@@ -23,8 +23,8 @@
 
     <!-- Splash screens for iOS -->
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
-    <script type="module" crossorigin src="/assets/index-C5rdBDsu.js"></script>
-    <link rel="stylesheet" crossorigin href="/assets/index-nqJ5Rq6m.css">
+    <script type="module" crossorigin src="/assets/index-Cb2GmT4j.js"></script>
+    <link rel="stylesheet" crossorigin href="/assets/index-CA19cW_f.css">
   </head>
   <body>
     <div id="root"></div>

Some files were not shown because too many files changed in this diff