Fixed gallery persisting through reconnects
This commit is contained in:
parent
e9c38cdb44
commit
38327aeccc
1 changed files with 18 additions and 0 deletions
|
|
@ -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...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue