Show disconnect button
This commit is contained in:
parent
80b9af1e32
commit
e6f48c5722
|
@ -95,13 +95,16 @@ const UI = {
|
||||||
this._supportsBroadcastChannel = (typeof BroadcastChannel !== "undefined");
|
this._supportsBroadcastChannel = (typeof BroadcastChannel !== "undefined");
|
||||||
if (this._supportsBroadcastChannel) {
|
if (this._supportsBroadcastChannel) {
|
||||||
this._controlChannel = new BroadcastChannel("registrationChannel");
|
this._controlChannel = new BroadcastChannel("registrationChannel");
|
||||||
this._controlChannel.addEventListener('message', (event) => {
|
this._controlChannel.onmessage = (event) => {
|
||||||
switch (event.data.eventType) {
|
switch (event.data.eventType) {
|
||||||
case 'identify':
|
case 'identify':
|
||||||
UI.identify(event.data)
|
UI.identify(event.data)
|
||||||
break;
|
break;
|
||||||
|
case 'secondarydisconnected':
|
||||||
|
UI.updateVisualState('disconnected');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1611,6 +1611,7 @@ export default class RFB extends EventTargetMixin {
|
||||||
this._disconnTimer = setTimeout(() => {
|
this._disconnTimer = setTimeout(() => {
|
||||||
Log.Error("Disconnection timed out.");
|
Log.Error("Disconnection timed out.");
|
||||||
this._updateConnectionState('disconnected');
|
this._updateConnectionState('disconnected');
|
||||||
|
this._proxyRFBMessage('secondarydisconnected')
|
||||||
}, DISCONNECT_TIMEOUT * 1000);
|
}, DISCONNECT_TIMEOUT * 1000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue