diff --git a/package.json b/package.json
index 047466fd..b83619e9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "meshcentral",
- "version": "0.1.5-r",
+ "version": "0.1.5-s",
"keywords": [
"Remote Management",
"Intel AMT",
diff --git a/views/default.handlebars b/views/default.handlebars
index bd60a24b..481d00bd 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -116,10 +116,10 @@
Hostname
-
-
+
+
AutoConnect
-
+
';
} else if ((view == 3) && (nodes[i].conn & 1) && ((meshrights & 8) != 0)) {
- r += '';
- //r += '
';
- r += '
' + name + '
';
- r += '
';
- r += '
';
- kvmDivs.push(nodes[i]._id);
+ if ((multiDesktopFilter.length == 0) || (multiDesktopFilter.indexOf('devid_' + nodes[i]._id) >= 0)) {
+ r += '';
+ //r += '
';
+ r += '
' + name + '
';
+ r += '
';
+ r += '
';
+ kvmDivs.push(nodes[i]._id);
+ }
}
deviceHeaderTotal++;
@@ -1553,8 +1561,8 @@
disconnectAllKvmFunction();
Q('autoConnectDesktopCheckbox').checked = false;
}
-
}
+ oldviewmode = view;
}
function toggleKvmDevice(nodeid) {
@@ -1588,14 +1596,15 @@
}
function connectMultiDesktop(node, contype) {
- var nodeid = node._id;
+ var nodeid = node._id, shortid = nodeid.split('/')[2];
var desk = multiDesktop[nodeid];
if (desk == null) {
+ if (Q('kvmid_' + shortid) == null) return; // Check if this device is being displayed, if not, exit now.
if (contype == 2) {
// Setup the Intel AMT remote desktop
if ((node.intelamt.user == null) || (node.intelamt.user == '')) { return; }
- desk = CreateAmtRedirect(CreateAmtRemoteDesktop('kvmid_' + nodeid.split('/')[2]));
- desk.shortid = nodeid.split('/')[2];
+ desk = CreateAmtRedirect(CreateAmtRemoteDesktop('kvmid_' + shortid));
+ desk.shortid = shortid;
//desk.debugmode = debugmode;
desk.onStateChanged = onMultiDesktopStateChange;
desk.m.bpp = 1;
@@ -1607,8 +1616,8 @@
multiDesktop[nodeid] = desk;
} else if (contype == 1) {
// Setup the Mesh Agent remote desktop
- desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + nodeid.split('/')[2]), serverPublicNamePort);
- desk.shortid = nodeid.split('/')[2];
+ desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + shortid), serverPublicNamePort);
+ desk.shortid = shortid;
desk.attemptWebRTC = attemptWebRTC;
desk.onStateChanged = onMultiDesktopStateChange;
desk.m.CompressionLevel = multidesktopsettings.quality;
@@ -3333,6 +3342,9 @@
desktop.m.sendcad();
}
+ // Toggle mouse and keyboard input
+ function toggleKvmControl() { putstore('DeskControl', (Q("DeskControl").checked?1:0)); }
+
// Save the desktop image to file
function deskSaveImage() {
if (xxdialogMode || desktop == null || desktop.State != 3) return;
@@ -3354,10 +3366,10 @@
desktop.m.SetDisplay(display);
}
- function dmousedown(e) { if (!xxdialogMode && desktop != null) desktop.m.mousedown(e) }
- function dmouseup(e) { if (!xxdialogMode && desktop != null) desktop.m.mouseup(e) }
- function dmousemove(e) { if (!xxdialogMode && desktop != null) desktop.m.mousemove(e) }
- function dmousewheel(e) { if (!xxdialogMode && desktop != null) { desktop.m.mousewheel(e); haltEvent(e); return true; } return false; }
+ function dmousedown(e) { if (!xxdialogMode && desktop != null && Q('DeskControl').checked) desktop.m.mousedown(e) }
+ function dmouseup(e) { if (!xxdialogMode && desktop != null && Q('DeskControl').checked) desktop.m.mouseup(e) }
+ function dmousemove(e) { if (!xxdialogMode && desktop != null && Q('DeskControl').checked) desktop.m.mousemove(e) }
+ function dmousewheel(e) { if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { desktop.m.mousewheel(e); haltEvent(e); return true; } return false; }
function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
//