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.
This commit is contained in:
maziggy
2026-04-08 11:38:50 +02:00
parent b76d6210cf
commit 4c55eadeb6
3 changed files with 5 additions and 8 deletions
@@ -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;
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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>