mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-21 10:15:04 +02:00
fix(queue): persist clear plate state across page refresh (#410)
After clicking "Clear Plate & Start Next", refreshing the page showed the button again because the frontend determined the state purely from the printer's FINISH/FAILED status. The backend already tracked a plate_cleared flag in memory but never exposed it to the frontend. - Add plate_cleared field to PrinterStatus schema and API response - Pass plateCleared prop to PrinterQueueWidget - Skip clear plate UI when plate is already acknowledged - Add 2 tests for plateCleared=true behavior
This commit is contained in:
@@ -250,6 +250,8 @@ export interface PrinterStatus {
|
||||
big_fan2_speed: number | null; // Chamber/exhaust fan
|
||||
heatbreak_fan_speed: number | null; // Hotend heatbreak fan
|
||||
firmware_version: string | null; // Firmware version from MQTT
|
||||
// Queue: user has acknowledged plate is cleared for next queued print
|
||||
plate_cleared: boolean;
|
||||
}
|
||||
|
||||
export interface PrinterCreate {
|
||||
|
||||
Reference in New Issue
Block a user