fix: display standby macrogroup/macro when klipper state is cancelled

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej committed 2021-11-08 22:15:36 +01:00
1 parent 6597c9cdc2
commit bb9d10e00c
1 file changed
+2 -2
+2 -2
View File
@@ -54,7 +54,7 @@ export default class MacrogroupPanel extends Mixins(BaseMixin) {
if (!this.allMacros.find((existMacro: PrinterStateMacro) => existMacro.name.toLowerCase() === macro.name.toLowerCase())) return false
return (
(macro.showInStandby && ['standby', 'complete', 'error'].includes(this.printer_state)) ||
(macro.showInStandby && ['standby', 'cancelled', 'complete', 'error'].includes(this.printer_state)) ||
(macro.showInPause && this.printer_state === 'paused') ||
(macro.showInPrinting && this.printer_state === 'printing')
)
@@ -65,7 +65,7 @@ export default class MacrogroupPanel extends Mixins(BaseMixin) {
get macrogroupStatus() {
return (
(this.macrogroup.showInStandby && ['standby', 'complete', 'error'].includes(this.printer_state)) ||
(this.macrogroup.showInStandby && ['standby', 'cancelled', 'complete', 'error'].includes(this.printer_state)) ||
(this.macrogroup.showInPause && this.printer_state === 'paused') ||
(this.macrogroup.showInPrinting && this.printer_state === 'printing')
)