Fix SpoolBuddy update UI responsiveness and stale data

Rewrote update button states: single `busy` flag stays set from click
  through to device pickup — no more gap with no feedback. Buttons hide
  while any operation is in progress. Listens for spoolbuddy-online
  WebSocket event to reload the page after daemon re-registers, ensuring
  fresh version and status. Set staleTime to 0 on update check queries.
This commit is contained in:
maziggy
2026-03-23 15:04:56 +01:00
parent 559d41cc5e
commit 8be4bed384
4 changed files with 93 additions and 121 deletions
@@ -64,7 +64,7 @@ export function SpoolBuddyLayout() {
queryFn: () => device ? spoolbuddyApi.checkDaemonUpdate(device.device_id) : Promise.resolve(null),
enabled: !!device,
refetchInterval: 5 * 60 * 1000, // re-check every 5 minutes
staleTime: 30 * 1000,
staleTime: 0,
});
// Update alert based on device state and available updates