From baa886eff0d1c79c4a18e7c4aef8294f507e280c Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Mon, 5 Aug 2024 22:37:01 +0200 Subject: [PATCH] feat: add icon to display "wait for temperature" Signed-off-by: Stefan Dej --- .../Temperature/TemperaturePanelListItem.vue | 19 +++++++++++++++++++ src/locales/en.json | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/panels/Temperature/TemperaturePanelListItem.vue b/src/components/panels/Temperature/TemperaturePanelListItem.vue index 311e7b140..471107a55 100644 --- a/src/components/panels/Temperature/TemperaturePanelListItem.vue +++ b/src/components/panels/Temperature/TemperaturePanelListItem.vue @@ -7,6 +7,12 @@ {{ formatName }} + + + {{ $t('Panels.TemperaturePanel.WaitForTemperature') }} + @@ -68,6 +74,7 @@ import { convertName } from '@/plugins/helpers' import { mdiFan, mdiFire, + mdiFireAlert, mdiMemory, mdiPrinter3dNozzle, mdiPrinter3dNozzleAlert, @@ -79,6 +86,8 @@ import { additionalSensors, opacityHeaterActive, opacityHeaterInactive } from '@ @Component export default class TemperaturePanelListItem extends Mixins(BaseMixin) { + mdiFireAlert = mdiFireAlert + @Prop({ type: String, required: true }) readonly objectName!: string @Prop({ type: Boolean, required: true }) readonly isResponsiveMobile!: boolean @@ -270,6 +279,16 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) { return '' } + + get temperatureWait() { + return this.$store.state.printer.heaters?.temperature_wait ?? null + } + + get isWait() { + if (this.temperatureWait === null) return false + + return this.temperatureWait.includes(this.name) + } } diff --git a/src/locales/en.json b/src/locales/en.json index 5c403574b..542cfd09f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -792,7 +792,8 @@ "Target": "Target", "TemperaturesInChart": "Temperature [°C]", "TempTooHigh": "Temperature too high for {name}! (max: {max})", - "TempTooLow": "Temperature too low for {name}! (min: {min})" + "TempTooLow": "Temperature too low for {name}! (min: {min})", + "WaitForTemperature": "Wait for temperature" }, "ToolheadControlPanel": { "Absolute": "absolute",