From 1dfa48a01514d8af10c0bd08fce11917ef79e427 Mon Sep 17 00:00:00 2001 From: steadyjaw Date: Fri, 12 Nov 2021 20:38:59 +0100 Subject: [PATCH] refactor: remove hide e-stop button setting Signed-off-by: steadyjaw --- src/components/TheTopbar.vue | 6 +----- src/components/settings/SettingsUiSettingsTab.vue | 12 ------------ src/locales/en.json | 2 -- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/components/TheTopbar.vue b/src/components/TheTopbar.vue index 1062d2ca..46687797 100644 --- a/src/components/TheTopbar.vue +++ b/src/components/TheTopbar.vue @@ -39,7 +39,7 @@ :text="$vuetify.breakpoint.mdAndUp" color="error" class="button-min-width-auto px-3 emergency-button" - v-if="klippyIsConnected && !boolHideEmergencyButton" + v-if="klippyIsConnected" :loading="loadings.includes('topbarEmergencyStop')" @click="btnEmergencyStop"> mdi-alert-circle-outline{{ $t("App.TopBar.EmergencyStop") }} @@ -183,10 +183,6 @@ export default class TheTopbar extends Mixins(BaseMixin) { return this.$store.state.gui.dashboard.boolHideUploadAndPrintButton ?? false } - get boolHideEmergencyButton() { - return this.$store.state.gui.dashboard.boolHideEmergencyButton ?? false - } - btnEmergencyStop() { const confirmOnEmergencyStop = this.$store.state.gui.general.confirmOnEmergencyStop if (confirmOnEmergencyStop) { diff --git a/src/components/settings/SettingsUiSettingsTab.vue b/src/components/settings/SettingsUiSettingsTab.vue index 37609aba..6ad3cca6 100644 --- a/src/components/settings/SettingsUiSettingsTab.vue +++ b/src/components/settings/SettingsUiSettingsTab.vue @@ -67,10 +67,6 @@ - - - - @@ -171,14 +167,6 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) { this.$store.dispatch('gui/saveSetting', {name: 'dashboard.boolHideUploadAndPrintButton', value: newVal }) } - get boolHideEmergencyButton() { - return this.$store.state.gui.dashboard.boolHideEmergencyButton ?? false - } - - set boolHideEmergencyButton(newVal) { - this.$store.dispatch('gui/saveSetting', {name: 'dashboard.boolHideEmergencyButton', value: newVal }) - } - clearColorObject(color: any): string { if (typeof color === 'object' && 'hex' in color) color = color.hex diff --git a/src/locales/en.json b/src/locales/en.json index be11e9ad..4b80a71c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -673,8 +673,6 @@ "BoolWideNavDrawerDescription": "Display a wider Navigation Toolbar", "BoolHideUploadAndPrintButton": "Hide Upload and Print Button", "BoolHideUploadAndPrintButtonDescription": "Show or hide the \"Upload and Print\" button in the topbar.", - "BoolHideEmergencyButton": "Hide Emergency Button", - "BoolHideEmergencyButtonDescription": "Show or hide the \"EMERGENCY\" button in the topbar.", "DisplayCANCEL_PRINT": "Display CANCEL_PRINT", "DisplayCANCEL_PRINTDescription": "Shows the CANCEL_PRINT button permanently - no second layer confirmation needed.", "DisplayZOffset": "Show Z-Offset-Panel",