mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user