From 63c48166db26cbf01bdcbc0934e5ce603b6d5388 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 13 Mar 2024 23:27:41 +0100 Subject: [PATCH] refactor: move getter in btnCoolDown function to separate getter function Signed-off-by: Stefan Dej --- .../panels/Temperature/TemperaturePanelPresets.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/panels/Temperature/TemperaturePanelPresets.vue b/src/components/panels/Temperature/TemperaturePanelPresets.vue index 82856b351..a54464573 100644 --- a/src/components/panels/Temperature/TemperaturePanelPresets.vue +++ b/src/components/panels/Temperature/TemperaturePanelPresets.vue @@ -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) { @@ -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 }