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:29:44 +02:00
parent b6599dd419
commit b76d6210cf
22 changed files with 1330 additions and 450 deletions
+6
View File
@@ -5267,6 +5267,12 @@ export const spoolbuddyApi = {
body: '{}',
}),
systemCommand: (deviceId: string, command: 'reboot' | 'shutdown' | 'restart_daemon' | 'restart_browser') =>
request<{ status: string; command: string }>(`/spoolbuddy/devices/${deviceId}/system/command`, {
method: 'POST',
body: JSON.stringify({ command }),
}),
queueDiagnostics: (deviceId: string, type: 'nfc' | 'scale' | 'read_tag') =>
request<{ status: string; diagnostic: string; message: string }>(
`/spoolbuddy/diagnostics/${deviceId}/run?diagnostic=${type}`,