Adding disconnect_message Confirmation

When parameter disconnect_message is set, it will show a message to confirm the disconection being its value the text on the confirm dialog.

This is related to the issue #1502 "two-step 'disconnect' option with custom message #1502"
This commit is contained in:
yatru 2021-09-03 12:41:53 +02:00 committed by GitHub
parent fcb95821b7
commit ce61d2da57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1047,6 +1047,10 @@ const UI = {
}, },
disconnect() { disconnect() {
// When parameter disconnect_message is set, it will show a message to confirm the disconection being its value the text on the confirm dialog
if (WebUtil.getConfigVar('disconnect_message', false) && confirm( WebUtil.getConfigVar('disconnect_message') ) == false ) {
return;
}
UI.rfb.disconnect(); UI.rfb.disconnect();
UI.connected = false; UI.connected = false;