From 890b9969aeb7e417fc733543bb486217c4c9eeed Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 24 Sep 2023 01:16:59 +0200 Subject: [PATCH] refactor: split ExtruderControlPanel.vue in multiple SFC (#1565) --- src/components/inputs/MacroButton.vue | 8 +- src/components/inputs/NumberInput.vue | 52 +- src/components/mixins/base.ts | 4 + src/components/mixins/extruder.ts | 40 ++ .../Extruder/EstimatedExtrusionOutput.vue | 42 ++ .../Extruder/ExtruderControlPanelControl.vue | 320 ++++++++++++ .../Extruder/ExtruderControlPanelTools.vue | 69 +++ .../ExtruderControlPanelToolsItem.vue | 45 ++ .../Extruder/ExtrusionFactorSettings.vue | 27 + .../Extruder/FirmwareRetractionSettings.vue | 148 ++++++ .../Extruder/PressureAdvanceSettings.vue | 144 ++++++ .../panels/ExtruderControlPanel.vue | 488 ++---------------- .../FirmwareRetractionSettings.vue | 152 ------ .../PressureAdvanceSettings.vue | 133 ----- src/store/printer/getters.ts | 22 - 15 files changed, 892 insertions(+), 802 deletions(-) create mode 100644 src/components/mixins/extruder.ts create mode 100644 src/components/panels/Extruder/EstimatedExtrusionOutput.vue create mode 100644 src/components/panels/Extruder/ExtruderControlPanelControl.vue create mode 100644 src/components/panels/Extruder/ExtruderControlPanelTools.vue create mode 100644 src/components/panels/Extruder/ExtruderControlPanelToolsItem.vue create mode 100644 src/components/panels/Extruder/ExtrusionFactorSettings.vue create mode 100644 src/components/panels/Extruder/FirmwareRetractionSettings.vue create mode 100644 src/components/panels/Extruder/PressureAdvanceSettings.vue delete mode 100644 src/components/panels/ExtruderSettings/FirmwareRetractionSettings.vue delete mode 100644 src/components/panels/ExtruderSettings/PressureAdvanceSettings.vue diff --git a/src/components/inputs/MacroButton.vue b/src/components/inputs/MacroButton.vue index 89586f774..873d4cb21 100644 --- a/src/components/inputs/MacroButton.vue +++ b/src/components/inputs/MacroButton.vue @@ -59,7 +59,7 @@ {{ mdiMenuDown }} - + - - - + + + + + + + + + + + + + - - diff --git a/src/components/panels/ExtruderSettings/FirmwareRetractionSettings.vue b/src/components/panels/ExtruderSettings/FirmwareRetractionSettings.vue deleted file mode 100644 index 51223065c..000000000 --- a/src/components/panels/ExtruderSettings/FirmwareRetractionSettings.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - diff --git a/src/components/panels/ExtruderSettings/PressureAdvanceSettings.vue b/src/components/panels/ExtruderSettings/PressureAdvanceSettings.vue deleted file mode 100644 index b7f2a1921..000000000 --- a/src/components/panels/ExtruderSettings/PressureAdvanceSettings.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index d9d330479..3da6dcbc9 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -772,28 +772,6 @@ export const getters: GetterTree = { return output }, - getToolchangeMacros: (state, getters) => { - const macros = getters['getMacros'] - const tools: PrinterStateToolchangeMacro[] = [] - - macros - .filter((macro: any) => macro.name.toUpperCase().match(/^T\d+/)) - .forEach((macro: any) => - tools.push({ - name: macro.name, - active: macro.variables.active ?? false, - color: macro.variables.color ?? macro.variables.colour ?? null, - }) - ) - - return tools.sort((a, b) => { - const numberA = parseInt(a.name.slice(1)) - const numberB = parseInt(b.name.slice(1)) - - return numberA - numberB - }) - }, - getKinematics: (state) => { if (!state.configfile?.settings?.printer) return false