From 62aa5e76cc71c0f448a6cc6cfb97510b3686275d Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 20 Jan 2021 01:08:55 -0800 Subject: [PATCH] Added remote desktop lock UI. --- public/images/icon-lock.png | Bin 0 -> 394 bytes public/styles/style.css | 2 +- views/default.handlebars | 9 ++++++++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 public/images/icon-lock.png diff --git a/public/images/icon-lock.png b/public/images/icon-lock.png new file mode 100644 index 0000000000000000000000000000000000000000..e13a45adebe98d43fdee07f23751f6cf4daa7e89 GIT binary patch literal 394 zcmV;50d@X~P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0Ut?3K~y+TrI9^O zgg_L4XI*JPLP$7)6(Pn-EiACL;TSfaz)N_9^$ynBnAn?G5vQ}WA_PM;`1ie8SU2u4 zy75cCyx}qP=FQAR+1bYv+{Q<|z+3zir}&Pa_}a%0Ji}kv!44mAPZD{a?`Bzc&rpgS zO3uYO%8m!-tEVW6lpqCWCgI=`U*^LVp73Tq{AQz%15=dq+jzsD^H&q=viywKc!bk9 zj-S&sRle`5wry2ema3|%E&j1TEO+4JCQeusie1+&lsw82W!?ho5oBi;nX%`2 z=6eil0a+A9k%^)UYXRAP=wOIr{QDK09mosRb?xk8^b&{jyDm_WXBo(_LLCHwPLf22 oVW=sh=|VS6qvapo;T3{XU$?MdNJ$Sg_y7O^07*qoM6N<$f}j_u{{R30 literal 0 HcmV?d00001 diff --git a/public/styles/style.css b/public/styles/style.css index 1a9567ae..63c88cb5 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -2549,7 +2549,7 @@ a { -ms-grid-row: 4; } -#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton { +#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton { float: right; margin-top: 1px; margin-right: 4px; diff --git a/views/default.handlebars b/views/default.handlebars index def26a27..c93bfe74 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -619,6 +619,7 @@   + @@ -6347,6 +6348,11 @@ meshserver.send({ action: 'toast', nodeids: [ currentNode._id ], title: decodeURIComponent('{{{extitle}}}'), msg: Q('d2devToast').value }); } + function deviceLockFunction() { + if (xxdialogMode) return; + if ((desktop != null) && (desktop.contype == 1)) { desktop.sendCtrlMsg('{"action":"lock"}'); } // Lock desktop + } + function showShareDevice() { if (xxdialogMode) return; var y = '', x = "Creates a link that allows a guest without an account to remote control this device for a limited time." + '

'; @@ -6949,7 +6955,8 @@ QV('DeskRecordButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && (desktop.m.StartRecording != null)); QV('DeskChatButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (inputAllowed) && (currentNode.agent) && online); QV('DeskNotifyButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (currentNode.agent) && online); - + //QV('DeskLockButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (currentNode.agent) && (deskState == 3)); + QV('DeskLockButton', false); // TODO: Work on adding remote desktop lock feature. QV('DeskToolsButton', (inputAllowed) && (currentNode.agent) && online); QV('DeskOpenWebButton', (browserfullscreen == false) && (inputAllowed) && (currentNode.agent) && online); QV('DeskBackgroundButton', (deskState == 3) && (desktop.contype == 1) && (currentNode.agent) && (currentNode.agent.id != 11) && (currentNode.agent.id != 16) && online);