mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
More work on remote desktop sharing.
This commit is contained in:
parent
51f2c9b0a7
commit
a9a037b073
71 changed files with 1870 additions and 1877 deletions
|
@ -2981,7 +2981,12 @@
|
|||
x += addHtmlValue("Device", node.name);
|
||||
x += addHtmlValue("Guest Name", message.guestname);
|
||||
x += addHtmlValue("Expire Time", printDateTime(new Date(message.expire)));
|
||||
x += addHtmlValue("User Consent", ["None", "Notify Only", "Prompt for consent"][message.consent]);
|
||||
var y = [];
|
||||
if (message.consent & 1) { y.push("Notify"); }
|
||||
if (message.consent & 8) { y.push("Prompt"); }
|
||||
if (message.consent & 64) { y.push("Privacy bar"); }
|
||||
if (y.length == 0) { y.push("None"); }
|
||||
x += addHtmlValue("User Consent", y.join(', '));
|
||||
x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px"><a href="' + message.url + '" id=agentInvitationLink target="_blank" style=cursor:pointer>' + "Remote Desktop Link" + '</a> <img src=images/link4.png height=10 width=10 title="' + "Copy link to clipboard" + '" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
|
||||
setDialogMode(2, "Share Device", 1, null, x);
|
||||
break;
|
||||
|
@ -5942,8 +5947,8 @@
|
|||
if (xxdialogMode) return;
|
||||
var x = "Creates a link that allows a guest without an account to remote desktop into this device for up to 1 hour." + '<br /><br />';
|
||||
x += addHtmlValue("Guest Name", '<input id=d2inviteName style=width:250px maxlength=128 type=text onkeyup=showShareDeviceValidate() />');
|
||||
x += addHtmlValue("Expire Time", '<select id=d2inviteExpire style=float:right;width:250px><option value=5>' + "5 minutes" + '</option><option value=10>' + "10 minutes" + '</option><option value=15>' + "15 minutes" + '</option><option value=30>' + "30 minutes" + '</option><option value=45>' + "45 minutes" + '</option><option value=60>' + "1 hour" + '</option></select>');
|
||||
x += addHtmlValue("User Consent", '<select id=d2userConsent style=float:right;width:250px><option value=2>' + "Prompt for consent" + '</option><option value=1>' + "Notify Only" + '</option></select>');
|
||||
x += addHtmlValue("Expire Time", '<select id=d2inviteExpire style=float:right;width:250px><option value=1>' + "1 minute" + '</option><option value=5>' + "5 minutes" + '</option><option value=10>' + "10 minutes" + '</option><option value=15>' + "15 minutes" + '</option><option value=30>' + "30 minutes" + '</option><option value=45>' + "45 minutes" + '</option><option value=60>' + "1 hour" + '</option></select>');
|
||||
x += addHtmlValue("User Consent", '<select id=d2userConsent style=float:right;width:250px><option value=73>' + "Prompt for consent" + '</option><option value=65>' + "Notify Only" + '</option></select>');
|
||||
setDialogMode(2, "Share Device", 3, showShareDeviceEx, x);
|
||||
showShareDeviceValidate();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<span id="deskstatus">Disconnected</span><span id="deskmetadata"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);">
|
||||
<div id=deskarea3x style="max-height:calc(100vh - 52px);height:calc(100vh - 52px);">
|
||||
<div id=DeskFocus oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div>
|
||||
<div id=DeskParent>
|
||||
<canvas id=Desk width=640 height=480 oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas>
|
||||
|
@ -157,19 +157,20 @@
|
|||
var agentPresent = true;
|
||||
var intelAmtPresent = false;
|
||||
var deskAspectRatio = 0;
|
||||
var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false };
|
||||
var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 100, localkeymap: false };
|
||||
var p11DeskConsoleMsgTimer = null;
|
||||
var serverPublicNamePort = '{{{serverDnsName}}}:{{{serverPublicPort}}}';
|
||||
var domain = '{{{domain}}}';
|
||||
var domainUrl = '{{{domainurl}}}';
|
||||
var authCookie = '{{{authCookie}}}';
|
||||
var authRelayCookie = '{{{authRelayCookie}}}';
|
||||
var desktopNodeId = '{{{nodeid}}}';
|
||||
var urlargs = parseUriArgs();
|
||||
var debugmode = urlargs.debug;
|
||||
var attemptWebRTC = false;
|
||||
var updateSessionTimer = null;
|
||||
var StatusStrs = ["Disconnected", "Connecting...", "Setup...", "Connected", "Intel® AMT Connected"];
|
||||
var webPageFullScreen = false;
|
||||
var expire = '{{{expire}}}';
|
||||
if (expire != '') { QH('p11power', format("Expires at {0}", printTime(new Date(parseInt(expire))))) }
|
||||
|
||||
function start() {
|
||||
window.onresize = deskAdjust;
|
||||
|
@ -387,13 +388,13 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
desktop.Start(desktopNodeId, 16994, '*', '*', 0);
|
||||
desktop.Start(null, 16994, '*', '*', 0);
|
||||
desktop.contype = 2;
|
||||
} else if ((contype == null) || (contype == 1) || (contype == 3)) {
|
||||
// Setup the Mesh Agent remote desktop
|
||||
var meshserver = null;
|
||||
desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
|
||||
desktop.m.mouseCursorActive(xxcurrentView == 11);
|
||||
desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, null, domainUrl);
|
||||
desktop.m.mouseCursorActive(true);
|
||||
desktop.debugmode = debugmode;
|
||||
desktop.m.debugmode = debugmode;
|
||||
desktop.attemptWebRTC = attemptWebRTC;
|
||||
|
@ -417,7 +418,7 @@
|
|||
if (desktopsettings.framerate) { desktop.m.FrameRateTimer = desktopsettings.framerate; }
|
||||
desktop.m.onDisplayinfo = deskDisplayInfo;
|
||||
desktop.m.onScreenSizeChange = deskAdjust;
|
||||
desktop.Start(desktopNodeId);
|
||||
desktop.Start(null);
|
||||
desktop.latency.callback = function (ms) { console.log('latency', ms); updateSessionTime(); };
|
||||
desktop.contype = 1;
|
||||
}
|
||||
|
@ -486,7 +487,6 @@
|
|||
}
|
||||
|
||||
function onDesktopStateChange(xdesktop, state) {
|
||||
console.log('onDesktopStateChange', state);
|
||||
var xstate = state;
|
||||
if ((xstate == 3) && (xdesktop.contype == 2)) { xstate++; }
|
||||
var str = StatusStrs[xstate];
|
||||
|
@ -1102,6 +1102,9 @@
|
|||
function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
|
||||
function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
|
||||
function setSessionActivity() { sessionActivity = Date.now(); /*QH('idleTimeoutNotify', '');*/ }
|
||||
function printDate(d) { return d.toLocaleDateString(urlargs.locale); }
|
||||
function printTime(d) { return d.toLocaleTimeString(urlargs.locale); }
|
||||
function printDateTime(d) { return d.toLocaleString(urlargs.locale); }
|
||||
|
||||
start();
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue