From ce61d2da57e5eb5c23ae73a4050e5bd61e8d3ca3 Mon Sep 17 00:00:00 2001 From: yatru <44513142+yatru@users.noreply.github.com> Date: Fri, 3 Sep 2021 12:41:53 +0200 Subject: [PATCH] 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" --- app/ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/ui.js b/app/ui.js index cb6a9fda..ed2c020a 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1047,6 +1047,10 @@ const UI = { }, 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.connected = false;