[UI] Watch the connected flag for changes to update the Nav indicator.

This commit is contained in:
Fabio Manganiello 2023-11-12 13:55:37 +01:00
parent 60b5f235a7
commit cad36b7911
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -143,9 +143,7 @@ export default {
},
setConnected(connected) {
return () => {
this.connected = connected
}
},
},
@ -161,8 +159,9 @@ export default {
mounted() {
this.collapsed = this.collapsedDefault
bus.on('connect', this.setConnected(true))
bus.on('disconnect', this.setConnected(false))
bus.on('connect', () => this.setConnected(true))
bus.on('disconnect', () => this.setConnected(false))
this.$watch(() => this.$root.connected, (value) => this.setConnected(value))
this.setConnected(this.$root.connected)
},
}