File tree 1 file changed +8
-12
lines changed
src/components/widgets/thermals
1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change 10
10
>
11
11
<v-list dense >
12
12
<v-list-item
13
- :disabled =" !klippyReady || printerPrinting"
13
+ :disabled =" !klippyReady || printerPrinting || !heaterIsOn "
14
14
@click =" $emit('turn-off', heater)"
15
15
>
16
16
<v-list-item-icon >
23
23
</v-list-item-content >
24
24
</v-list-item >
25
25
26
- <v-divider v-if = " supportsPidCalibrate || supportsMpcCalibrate " />
26
+ <v-divider />
27
27
28
28
<v-list-item
29
- v-if =" supportsPidCalibrate"
30
29
:disabled =" !klippyReady || printerPrinting"
31
30
@click =" $emit('pid-calibrate', heater)"
32
31
>
41
40
</v-list-item >
42
41
43
42
<v-list-item
44
- v-if =" supportsMpcCalibrate "
45
- :disabled =" !klippyReady || printerPrinting"
43
+ v-if =" klippyApp.isKalicoOrDangerKlipper "
44
+ :disabled =" !klippyReady || printerPrinting || !heaterUsesMpcControl "
46
45
@click =" $emit('mpc-calibrate', heater)"
47
46
>
48
47
<v-list-item-icon >
@@ -81,15 +80,12 @@ export default class HeaterContextMenu extends Mixins(StateMixin) {
81
80
return this .$store .getters [' printer/getKlippyApp' ] as KlippyApp
82
81
}
83
82
84
- get supportsPidCalibrate () {
85
- return [ ' pid ' , ' pid_v ' ]. includes ( this .heater .config ?. control )
83
+ get heaterIsOn () {
84
+ return this .heater .target > 0
86
85
}
87
86
88
- get supportsMpcCalibrate () {
89
- return (
90
- this .klippyApp .isKalicoOrDangerKlipper &&
91
- this .heater .config ?.control === ' mpc'
92
- )
87
+ get heaterUsesMpcControl () {
88
+ return this .heater .config ?.control === ' mpc'
93
89
}
94
90
}
95
91
</script >
You can’t perform that action at this time.
0 commit comments