UI: improve offline detection (#14705)

This commit is contained in:
Michael Geers 2024-07-05 15:51:41 +02:00 • committed by GitHub
parent 5db2d5402c
commit fcc00c54a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,8 +61,11 @@ export default {
this.reload();
}
},
offline: function () {
offline: function (now, prev) {
updateAuthStatus();
if (now && !prev) {
this.reconnect();
}
},
},
computed: {
@ -157,7 +160,6 @@ export default {
this.ws.onclose = () => {
console.log("websocket disconnected");
window.app.setOffline();
this.reconnect();
};
this.ws.onmessage = (evt) => {
try {