fix: hide toolhead, extruder & temperature panel if they have no content (#852)

* refactor: fix deprecated substr function

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* refactor: remove unused import

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* fix: hide toolhead, extruder and temperature panel if it is not available

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej authored and GitHub committed 2022-05-28 15:47:48 +02:00
1 parent a5a7d05460
commit d85a072a39
4 files changed
+58 -3

No files matched your search

+10
View File
@@ -452,6 +452,10 @@ export const getters: GetterTree<PrinterState, RootState> = {
return additionValues
},
getAvailableHeaters: (state) => {
return state.heaters?.available_heaters ?? []
},
getAvailableSensors: (state) => {
return state.heaters?.available_sensors ?? []
},
@@ -870,6 +874,12 @@ export const getters: GetterTree<PrinterState, RootState> = {
return tools
},
getKinematics: (state) => {
if (!state.configfile?.settings?.printer) return false
return state.configfile?.settings?.printer.kinematics ?? 'none'
},
existsQGL: (state) => {
if (!state.configfile?.settings) return false