Show disconnect button

This commit is contained in:
Chris Hunt 2023-10-24 12:14:18 +01:00
parent 80b9af1e32
commit e6f48c5722
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -95,13 +95,16 @@ const UI = {
this._supportsBroadcastChannel = (typeof BroadcastChannel !== "undefined");
if (this._supportsBroadcastChannel) {
this._controlChannel = new BroadcastChannel("registrationChannel");
this._controlChannel.addEventListener('message', (event) => {
this._controlChannel.onmessage = (event) => {
switch (event.data.eventType) {
case 'identify':
UI.identify(event.data)
break;
case 'secondarydisconnected':
UI.updateVisualState('disconnected');
break;
}
});
};
}

View File

@ -1611,6 +1611,7 @@ export default class RFB extends EventTargetMixin {
this._disconnTimer = setTimeout(() => {
Log.Error("Disconnection timed out.");
this._updateConnectionState('disconnected');
this._proxyRFBMessage('secondarydisconnected')
}, DISCONNECT_TIMEOUT * 1000);
break;