Skip to content

Commit

Permalink
feat: add icon to display "wait for temperature"
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Aug 5, 2024
1 parent e75a7aa commit baa886e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/components/panels/Temperature/TemperaturePanelListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
</td>
<td class="name">
<span class="cursor-pointer" @click="showEditDialog = true">{{ formatName }}</span>
<v-tooltip v-if="isWait" top>
<template #activator="{ on, attrs }">
<v-icon class="ml-2 text--disabled" small v-bind="attrs" v-on="on">{{ mdiFireAlert }}</v-icon>
</template>
<span>{{ $t('Panels.TemperaturePanel.WaitForTemperature') }}</span>
</v-tooltip>
</td>
<td v-if="!isResponsiveMobile" class="state">
<v-tooltip v-if="state !== null" top>
Expand Down Expand Up @@ -68,6 +74,7 @@ import { convertName } from '@/plugins/helpers'
import {
mdiFan,
mdiFire,
mdiFireAlert,
mdiMemory,
mdiPrinter3dNozzle,
mdiPrinter3dNozzleAlert,
Expand All @@ -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
Expand Down Expand Up @@ -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)
}
}
</script>

Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit baa886e

Please sign in to comment.