Skip to content

Commit

Permalink
refactor: move getter in btnCoolDown function to separate getter func…
Browse files Browse the repository at this point in the history
…tion

Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Mar 13, 2024
1 parent 5c02119 commit 63c4816
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/panels/Temperature/TemperaturePanelPresets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export default class TemperaturePanelPresets extends Mixins(BaseMixin) {
return this.$store.getters['gui/presets/getCooldownGcode']
}
get confirmOnCoolDown(): boolean {
return this.$store.state.gui.uiSettings.confirmOnCoolDown
}
preheat(preset: GuiPresetsStatePreset): void {
for (const [name, attributes] of Object.entries(preset.values)) {
if (attributes.bool) {
Expand Down Expand Up @@ -108,8 +112,7 @@ export default class TemperaturePanelPresets extends Mixins(BaseMixin) {
}
btnCoolDown(): void {
const confirmOnCoolDown = this.$store.state.gui.uiSettings.confirmOnCoolDown
if (confirmOnCoolDown) {
if (this.confirmOnCoolDown) {
this.showCoolDownDialog = true
return
}
Expand Down

0 comments on commit 63c4816

Please sign in to comment.