1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added support for locking user desktop on Windows.

This commit is contained in:
Ylian Saint-Hilaire 2021-04-26 18:27:51 -07:00
parent 84b9d3df09
commit 3a92c077b9
2 changed files with 20 additions and 26 deletions

View file

@ -6762,9 +6762,9 @@
meshserver.send({ action: 'toast', nodeids: [ currentNode._id ], title: decodeURIComponent('{{{extitle}}}'), msg: Q('d2devToast').value });
}
// Lock desktop
function deviceLockFunction() {
if (xxdialogMode) return;
if ((desktop != null) && (desktop.contype == 1)) { desktop.sendCtrlMsg('{"action":"lock"}'); } // Lock desktop
if ((xxdialogMode == null) && (desktop != null) && (desktop.contype == 1)) { setDialogMode(2, "Lock Desktop", 3, function() { if ((desktop != null) && (desktop.contype == 1)) { desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"lock"}'); } }, "Lock user desktop?"); }
}
function showShareDevice() {
@ -7465,8 +7465,7 @@
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('DeskLockButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (currentNode.agent) && (deskState == 3));
QV('DeskToolsButton', (deskState == 3) && (currentNode.agent) && online);
QE('DeskToolsButton', inputAllowed);
QV('DeskOpenWebButton', (browserfullscreen == false) && (inputAllowed) && (currentNode.agent) && online);