Fixed gallery persisting through reconnects

This commit is contained in:
Joel Collins 2019-11-26 16:06:38 +00:00
parent e9c38cdb44
commit 38327aeccc

View file

@ -241,6 +241,24 @@ export default {
});
},
created: function() {
// Watch for host 'ready', then update status
this.$store.watch(
(state, getters) => {
return getters.ready;
},
ready => {
if (ready) {
// If the connection is now ready, update capture list
this.updateCaptureList();
} else {
// If the connection is now disconnected, empty capture list
this.captures = {};
}
}
);
},
methods: {
updateCaptureList: function() {
console.log("Updating capture list...");