Просмотр исходного кода

Add SpoolBuddy quick menu with power control and system commands (#893)

  Swipe down from the top of the SpoolBuddy display to open a quick-access
  menu for toggling printer smart plugs and managing the device (restart
  daemon, restart browser, reboot, shutdown). All destructive actions
  require confirmation.

  Backend: new POST /spoolbuddy/devices/{id}/system/command endpoint
  queuing reboot/shutdown/restart_daemon/restart_browser commands.
  Daemon: handles commands via subprocess (sudo reboot, systemctl restart).
  Frontend: SpoolBuddyQuickMenu component, swipe-down gesture detection,
  i18n keys for all 7 locales.
maziggy 1 месяц назад
Родитель
Сommit
4c55eadeb6

+ 3 - 6
frontend/src/components/spoolbuddy/SpoolBuddyLayout.tsx

@@ -167,12 +167,9 @@ export function SpoolBuddyLayout() {
     touchStartRef.current = null;
     swipeLockedRef.current = false;
 
-    // Vertical swipe: open/close quick menu
-    if (Math.abs(dy) >= SWIPE_THRESHOLD && Math.abs(dy) > Math.abs(dx)) {
-      if (dy > 0 && startY < 80) {
-        // Swipe down from top area → open quick menu
-        setQuickMenuOpen(true);
-      }
+    // Vertical swipe down from top edge → open quick menu
+    if (dy >= SWIPE_THRESHOLD && Math.abs(dy) > Math.abs(dx) && startY < 80) {
+      setQuickMenuOpen(true);
       return;
     }
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/assets/index-C5rdBDsu.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-DPDJoHI3.js"></script>
+    <script type="module" crossorigin src="/assets/index-C5rdBDsu.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-nqJ5Rq6m.css">
   </head>
   <body>

Некоторые файлы не были показаны из-за большого количества измененных файлов