From ecaa894fbb7ae9cb2ebc1dbb9688b7eef312b740 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Tue, 5 Sep 2023 07:34:18 +0200 Subject: [PATCH] refactor: refactor ToolheadControlPanel (#1530) --- src/components/inputs/ToolSlider.vue | 3 +- .../panels/ToolheadControlPanel.vue | 32 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/components/inputs/ToolSlider.vue b/src/components/inputs/ToolSlider.vue index 9b61a65b6..ba30623da 100644 --- a/src/components/inputs/ToolSlider.vue +++ b/src/components/inputs/ToolSlider.vue @@ -85,6 +85,7 @@ import { Component, Mixins, Prop, Watch } from 'vue-property-decorator' import { Debounce } from 'vue-debounce-decorator' import BaseMixin from '@/components/mixins/base' import { mdiLockOpenVariantOutline, mdiLockOutline, mdiMinus, mdiPlus, mdiRestart } from '@mdi/js' +import { TranslateResult } from 'vue-i18n' @Component export default class ToolSlider extends Mixins(BaseMixin) { @@ -107,7 +108,7 @@ export default class ToolSlider extends Mixins(BaseMixin) { @Prop({ type: Number, required: true }) declare readonly target: number @Prop({ type: String, required: true }) declare readonly command: string @Prop({ type: String, default: '' }) declare readonly attributeName: string - @Prop({ type: String, default: '' }) declare readonly label: string + @Prop({ default: '' }) declare readonly label: string | TranslateResult @Prop({ type: String, default: '' }) declare readonly icon: string @Prop({ type: String, default: '%' }) declare readonly unit: string @Prop({ type: Number, default: 1 }) declare readonly attributeScale: number diff --git a/src/components/panels/ToolheadControlPanel.vue b/src/components/panels/ToolheadControlPanel.vue index 1a2c3a814..25d0277c3 100644 --- a/src/components/panels/ToolheadControlPanel.vue +++ b/src/components/panels/ToolheadControlPanel.vue @@ -2,19 +2,11 @@ -