diff --git a/components.d.ts b/components.d.ts index dd1589584a..ff05cf4dcd 100644 --- a/components.d.ts +++ b/components.d.ts @@ -1,10 +1,10 @@ /* eslint-disable */ -/* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} +/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { ActionCommandPromptDialog: typeof import('./src/components/common/ActionCommandPromptDialog.vue')['default'] diff --git a/src/components/widgets/runout-sensors/RunoutSensorsCard.vue b/src/components/widgets/runout-sensors/RunoutSensorsCard.vue index f2346cf952..ad829bcf97 100644 --- a/src/components/widgets/runout-sensors/RunoutSensorsCard.vue +++ b/src/components/widgets/runout-sensors/RunoutSensorsCard.vue @@ -20,30 +20,36 @@ - - + - {{ item.name }} - - {{ (item.filament_detected) ? '$checkedCircle' : '$alertCircle' }} - - - - + + {{ item.prettyName }} + + + + $checkedCircle + + + $alertCircle + + + + + + + @@ -62,8 +68,7 @@ export default class RunoutSensorsCard extends Mixins(StateMixin) { } changeSensor (item: RunoutSensor, value: boolean) { - const enable: number = (value) ? 1 : 0 - this.sendGcode(`SET_FILAMENT_SENSOR SENSOR=${item.name} ENABLE=${enable}`) + this.sendGcode(`SET_FILAMENT_SENSOR SENSOR=${item.name} ENABLE=${+value}`) } } diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index 15a7712303..3918fe044d 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -425,6 +425,7 @@ export const getters: GetterTree = { const sensor = get(state.printer, item, undefined) sensors.push({ name, + prettyName: Vue.$filters.prettyCase(name), ...sensor }) }