bugfix: reload endstop status by changing the current page
this closes #19
This commit is contained in:
parent
98a7292b7b
commit
32daeedcf7
@ -50,14 +50,15 @@
|
|||||||
endstops: state => state.printer.endstops,
|
endstops: state => state.printer.endstops,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getEndstops();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncEndstops() {
|
syncEndstops() {
|
||||||
this.$store.commit('setLoadingEndstopStatus', true);
|
this.$store.commit('setLoadingEndstopStatus', true);
|
||||||
this.$socket.sendObj('get_printer_query_endstops_status', { }, "responseEndstopStatus");
|
this.$socket.sendObj('get_printer_query_endstops_status', { }, "responseEndstopStatus");
|
||||||
}
|
},
|
||||||
},
|
getEndstops() {
|
||||||
watch: {
|
|
||||||
endstops: function() {
|
|
||||||
this.sortEndstops = {};
|
this.sortEndstops = {};
|
||||||
|
|
||||||
let keys = Object.keys(this.endstops);
|
let keys = Object.keys(this.endstops);
|
||||||
@ -68,6 +69,11 @@
|
|||||||
this.sortEndstops[k] = this.endstops[k];
|
this.sortEndstops[k] = this.endstops[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
endstops: function() {
|
||||||
|
this.getEndstops();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user