bugfix: reload endstop status by changing the current page

this closes #19
This commit is contained in:
Stefan Dej 2020-07-18 19:32:12 +02:00
parent 98a7292b7b
commit 32daeedcf7

View File

@ -50,14 +50,15 @@
endstops: state => state.printer.endstops,
})
},
created() {
this.getEndstops();
},
methods: {
syncEndstops() {
this.$store.commit('setLoadingEndstopStatus', true);
this.$socket.sendObj('get_printer_query_endstops_status', { }, "responseEndstopStatus");
}
},
watch: {
endstops: function() {
},
getEndstops() {
this.sortEndstops = {};
let keys = Object.keys(this.endstops);
@ -68,6 +69,11 @@
this.sortEndstops[k] = this.endstops[k];
}
}
},
watch: {
endstops: function() {
this.getEndstops();
}
}
}
</script>