mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-21 10:15:04 +02:00
Post-print outcome confirmation: good/reject verdicts, one-tap links, yield stats (#3047)
This commit is contained in:
@@ -353,6 +353,17 @@ export function useWebSocket() {
|
||||
debouncedInvalidate('archiveStats');
|
||||
break;
|
||||
|
||||
case 'print_confirm_request': {
|
||||
// #1898: a completed print asked for its outcome verdict. Handed to
|
||||
// the globally mounted ConfirmOutcomeDialog in Layout via the same
|
||||
// CustomEvent relay plate_not_empty uses.
|
||||
const detail = (message as unknown as { data?: { archive_id?: number; print_name?: string } }).data;
|
||||
if (detail?.archive_id != null) {
|
||||
window.dispatchEvent(new CustomEvent('print-confirm-request', { detail }));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'kill_switch_triggered': {
|
||||
const printer = message.printer_name || `Printer ${message.printer_id ?? '?'}`;
|
||||
const filename = message.filename || t('common.unknown');
|
||||
|
||||
Reference in New Issue
Block a user