This commit is contained in:
petervanv 2020-05-16 00:00:47 +02:00
commit b4acd59867
3 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -58,7 +58,11 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
obj.onDisplayinfo = null;
obj.accumulator = null;
var xMouseCursorActive = true;
var xMouseCursorCurrent = 'default';
obj.mouseCursorActive = function (x) { if (xMouseCursorActive == x) return; xMouseCursorActive = x; obj.CanvasId.style.cursor = ((x == true) ? xMouseCursorCurrent : 'default'); }
var mouseCursors = ['default', 'progress', 'crosshair', 'pointer', 'help', 'text', 'no-drop', 'move', 'nesw-resize', 'ns-resize', 'nwse-resize', 'w-resize', 'alias', 'wait', 'none', 'not-allowed', 'col-resize', 'row-resize', 'copy', 'zoom-in', 'zoom-out'];
obj.Start = function () {
obj.State = 0;
obj.accumulator = null;
@ -305,7 +309,8 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
if (cmdsize != 5) break;
var cursorNum = str.charCodeAt(4);
if (cursorNum > mouseCursors.length) { cursorNum = 0; }
obj.CanvasId.style.cursor = mouseCursors[cursorNum];
xMouseCursorCurrent = mouseCursors[cursorNum];
if (xMouseCursorActive) { obj.CanvasId.style.cursor = xMouseCursorCurrent; }
break;
}
return cmdsize + jumboAdd;

View File

@ -3560,6 +3560,7 @@
} else if (contype == 1) {
// Setup the Mesh Agent remote desktop
desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + shortid), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
desk.m.mouseCursorActive(xxcurrentView == 11);
desk.shortid = shortid;
desk.attemptWebRTC = attemptWebRTC;
desk.onStateChanged = onMultiDesktopStateChange;
@ -5877,6 +5878,7 @@
if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
desktop.onStateChanged = onDesktopStateChange;
desktop.onMetadataChange = function(metadata) { updateMetadata(desktop, 'deskmetadata'); }
if (desktop && desktop.m.mouseCursorActive) { desktop.m.mouseCursorActive(true); }
desktopNode = currentNode;
onDesktopStateChange(desktop, desktop.State);
delete multiDesktop[currentNode._id];
@ -6063,6 +6065,7 @@
} else if ((contype == null) || (contype == 1) || ((contype == 3) && (currentNode.agent.id > 4))) {
// Setup the Mesh Agent remote desktop
desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
desktop.m.mouseCursorActive(xxcurrentView == 11);
desktop.debugmode = debugmode;
desktop.m.debugmode = debugmode;
desktop.attemptWebRTC = attemptWebRTC;
@ -10960,7 +10963,8 @@
x = '<div style=float:right;font-size:x-small>';
if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
x += '</div><div style=font-size:x-small>';
if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showUserChangePassDialog(' + multiFactor + ')\' title="' + "Change the password for this user" + '">' + "Change Password" + '</a>'; }
// If user admin rights and not SSPI/LDAP and UserID does not start with ~, show change password
if (userAdminRights && ((features & 0x00080000) == 0) && (userid.split('/')[2][0] != '~')) { x += '<a href=# style=cursor:pointer onclick=\'return p30showUserChangePassDialog(' + multiFactor + ')\' title="' + "Change the password for this user" + '">' + "Change Password" + '</a>'; }
x += '</div><br>'
QH('p30html3', x);