forked from platypush/platypush
[UI] Expose the connected
flag on the root element level.
This commit is contained in:
parent
4c0e3a16b6
commit
5c22271e88
2 changed files with 4 additions and 0 deletions
|
@ -32,6 +32,7 @@ export default {
|
|||
return {
|
||||
config: {},
|
||||
userAuthenticated: false,
|
||||
connected: false,
|
||||
pwaInstallEvent: null,
|
||||
}
|
||||
},
|
||||
|
@ -97,6 +98,8 @@ export default {
|
|||
|
||||
mounted() {
|
||||
bus.onNotification(this.onNotification)
|
||||
bus.on('connect', () => this.connected = true)
|
||||
bus.on('disconnect', () => this.connected = false)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -163,6 +163,7 @@ export default {
|
|||
this.collapsed = this.collapsedDefault
|
||||
bus.on('connect', this.setConnected(true))
|
||||
bus.on('disconnect', this.setConnected(false))
|
||||
this.setConnected(this.$root.connected)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue