Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add icon to display "wait for temperature" #1963

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading