diff --git a/src/mixins/toolhead.ts b/src/mixins/toolhead.ts index e01176bc2a..036d8e9505 100644 --- a/src/mixins/toolhead.ts +++ b/src/mixins/toolhead.ts @@ -78,10 +78,6 @@ export default class ToolheadMixin extends Vue { return !!this.$store.getters['printer/getPrinterSettings']('stepper_z1') as boolean } - get hasHomingOverride (): boolean { - return this.$store.getters['printer/getHasHomingOverride'] as boolean - } - get isManualProbeActive (): boolean { return this.$store.getters['printer/getIsManualProbeActive'] as boolean } diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index 2f36a5dbd3..8b2c0f5446 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -914,39 +914,44 @@ export const getters: GetterTree = { }, getHasWarnings: (state, getters, rootState) => { - if ( - (rootState.socket && rootState.socket.open && rootState.socket.ready) && - (getters.getPrinterWarnings.length > 0 || getters.getKlipperWarnings.length > 0 || - getters.getMoonrakerFailedComponents.length > 0 || getters.getMoonrakerWarnings.length > 0) - ) { - return true - } else { - return false - } + return ( + rootState.socket && + rootState.socket.open && + rootState.socket.ready && + ( + getters.getPrinterWarnings.length > 0 || + getters.getKlipperWarnings.length > 0 || + getters.getMoonrakerFailedComponents.length > 0 || + getters.getMoonrakerWarnings.length > 0 + ) + ) }, getPrinterWarnings: (state, getters) => { const config = getters.getPrinterConfig() const warnings = [] - if (config && !('virtual_sdcard' in config)) { - warnings.push({ message: '[virtual_sdcard] not found in printer configuration.' }) - } + if (config) { + if (!('virtual_sdcard' in config)) { + warnings.push({ message: '[virtual_sdcard] not found in printer configuration.' }) + } - if (config && !('pause_resume' in config)) { - warnings.push({ message: '[pause_resume] not found in printer configuration.' }) - } + if (!('pause_resume' in config)) { + warnings.push({ message: '[pause_resume] not found in printer configuration.' }) + } - if ( - config && - !('display' in config) && !('display_status' in config) - ) { - warnings.push({ message: '[display_status] is required if you do not have a [display] defined.' }) - } + if ( + !('display' in config) && + !('display_status' in config) + ) { + warnings.push({ message: '[display_status] is required if you do not have a [display] defined.' }) + } - if (config && !('gcode_macro CANCEL_PRINT' in config)) { - warnings.push({ message: 'CANCEL_PRINT macro not found in configuration.' }) + if (!('gcode_macro CANCEL_PRINT' in config)) { + warnings.push({ message: 'CANCEL_PRINT macro not found in configuration.' }) + } } + return warnings }, @@ -978,15 +983,6 @@ export const getters: GetterTree = { return saveConfigPendingItems || {} }, - getHasHomingOverride: (state, getters) => { - const config = getters.getPrinterConfig() - if (config && ('homing_override' in config)) { - return true - } else { - return false - } - }, - getHasRoundBed: (_, getters): boolean => { const kinematics = getters.getPrinterSettings('printer.kinematics') || ''