diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index 2f9583fc..0f0a2e52 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -180,6 +180,7 @@ + diff --git a/public/styles/style.css b/public/styles/style.css index 2d7ecbad..cadde009 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -608,7 +608,7 @@ body { } -#d7bitmapquality, #d7bitmapquality, #d7bitmapscaling, #d7framelimiter, #d7desktopmode { +#d7bitmapquality, #d7bitmapquality, #d7bitmapscaling, #d7framelimiter, #d7desktopmode, #d7rdpsize { float: right; width: 200px; height: 20px; @@ -619,16 +619,16 @@ body { border-bottom: 1px solid gray; } -#d7meshkvm div, #d7amtkvm div, #d3upload, #d3localmode { +#d7meshkvm div, #d7amtkvm div, #d7rdpkvm div, #d3upload, #d3localmode { margin: 3px 0 3px 0; display: flex; justify-content: space-between; } -#d7otherset { +#d7otherset, #d7rdpflags { border: 1px solid #666; - width: 200px; - height: 60px; + width: 230px; + height: 100px; overflow-y: scroll; background-color: white; } @@ -3234,4 +3234,36 @@ a { .night .desktopButtons { filter: invert(60%); -webkit-filter: invert(60%); - } \ No newline at end of file + } + + +.dtab { + overflow: hidden; + border-bottom: 1px solid #ccc; + background-color: #f1f1f1; +} + +.dtab button { + background-color: inherit; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 4px 6px; + transition: 0.3s; +} + +.dtab button:hover { + background-color: #ddd; +} + +.dtab button.active { + background-color: #ccc; +} + +.dtabcontent { + display: none; + padding: 6px 12px; + border: 1px solid #ccc; + border-top: none; +} \ No newline at end of file diff --git a/views/agentinvite.handlebars b/views/agentinvite.handlebars index bc281935..e03bd6ec 100644 --- a/views/agentinvite.handlebars +++ b/views/agentinvite.handlebars @@ -43,7 +43,6 @@ border: 1px solid #ccc; border-top: none; } - diff --git a/views/default.handlebars b/views/default.handlebars index ee41455a..35d30c0f 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -703,7 +703,6 @@ -
@@ -1278,9 +1277,14 @@
-
-

Agent Remote Desktop

-
+
+ + + +
+
+ +
Quality
@@ -1316,9 +1320,9 @@
-
-

Intel® AMT Hardware KVM

-
+
+ +
Image Encoding
+ + + + + + + + + + + +
+
+
Optimizations
+
+ + + + + + + + +
+
+
@@ -4726,8 +4761,9 @@ function onDeviceSearchChanged(e) { if (e != null) { if (e.target.id == 'SearchInput') { Q('KvmSearchInput').value = Q('SearchInput').value; } else { Q('SearchInput').value = Q('KvmSearchInput').value; } } mainUpdate(5); } function showMultiDesktopSettings() { - QV('d7amtkvm', false); - QV('d7meshkvm', true); + QV('td7amtkvm', false); + QV('td7meshkvm', true); + QV('td7rdpkvm', false); QV('d7desktopOtherSettings', false); d7bitmapquality.value = multidesktopsettings.quality; d7bitmapscaling.value = multidesktopsettings.scaling; @@ -5928,7 +5964,6 @@ if (action == 1) { connectDesktop(null, 3, null, 0x0008 + 0x0040); } // Consent Prompt + Privacy bar if (action == 2) { connectDesktop(null, 3, null, 0x0008); } // Consent Prompt if (action == 3) { connectDesktop(null, 3, null, 0x0040); } // Privacy bar - if (action == 4) { askRdpCredentials(); } // RDP if (action == 10) { if (desktop != null) { desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":true}'); connectDesktop(); } } // Disconnect and lock if (action == 11) { if (desktop != null) { desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":false}'); connectDesktop(); } } // Disconnect without lock } @@ -8277,8 +8312,9 @@ ); } // Show the right settings - QV('d7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2))); - QV('d7meshkvm', (webRtcDesktop) || ((currentNode.agent != null) && (currentNode.agent.caps & 1) && ((deskState == false) || (desktop.contype == 1)))); + QV('td7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (currentNode.agent == null))) && ((deskState == 0) || (desktop.contype == 2))); + QV('td7meshkvm', (webRtcDesktop) || ((currentNode.agent != null) && (currentNode.agent.caps & 1) && ((deskState == 0) || (desktop.contype == 1)))); + QV('td7rdpkvm', ((currentNode.agent != null) && ((currentNode.agent.id == 3) || (currentNode.agent.id == 4)) && ((deskState == 0) || (desktop.contype == 4)))); // Enable buttons var inputAllowed = ((features2 & 0x2000) == 0) && ((currentNode.agent == null) || (currentNode.agent.id != 14)) && ((rights == 0xFFFFFFFF) || (((rights & 8) != 0) && ((rights & 256) == 0) && ((rights & 4096) == 0))); @@ -8694,9 +8730,31 @@ if (xxdialogMode) return; applyDesktopSettings(); updateDesktopButtons(); + + if (QS('td7meshkvm').display != 'none') { changeDesktopSettingsTab(null, 'd7meshkvm'); } + else if (QS('td7rdpkvm').display != 'none') { changeDesktopSettingsTab(null, 'd7rdpkvm'); } + else if (QS('td7amtkvm').display != 'none') { changeDesktopSettingsTab(null, 'd7amtkvm'); } + setDialogMode(7, "Remote Desktop Settings", 3, showDesktopSettingsChanged); } + function changeDesktopSettingsTab(evt, tabname) { + // Declare all variables + var i, tabcontent, tablinks; + + // Get all elements with class="tabcontent" and hide them + tabcontent = document.getElementsByClassName('tabcontent'); + for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = 'none'; } + + // Get all elements with class="tablinks" and remove the class "active" + tablinks = document.getElementsByClassName('tablinks'); + for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(' active', ''); } + + // Show the current tab, and add an "active" class to the button that opened the tab + document.getElementById(tabname).style.display = 'block'; + if (evt != null) { evt.currentTarget.className += ' active'; } else { document.getElementById('t' + tabname).className += ' active'; } + } + function showDesktopSettingsChanged() { desktopsettings.encoding = d7desktopmode.value; desktopsettings.showfocus = d7showfocus.checked; @@ -8709,6 +8767,11 @@ desktopsettings.autoclipboard = d7deskAutoClipboard.checked; desktopsettings.autolock = d7deskAutoLock.checked; desktopsettings.localkeymap = d7localKeyMap.checked; + desktopsettings.rdpsize = parseInt(d7rdpsize.value); + desktopsettings.rdpflags = d7rdpsize.value; + var rdpflags = 0; + for (var i = 1; i < 10; i++) { if ((i != 5) && (Q('d7rdp' + i).checked)) { rdpflags |= (1 << (i - 1)); } } + desktopsettings.rdpflags = rdpflags; localStorage.setItem('desktopsettings', JSON.stringify(desktopsettings)); applyDesktopSettings(); updateDesktopButtons(); @@ -8745,6 +8808,9 @@ if (desktopsettings.autolock != null) { d7deskAutoLock.checked = desktopsettings.autolock; } if (desktopsettings.localkeymap) { d7localKeyMap.checked = desktopsettings.localkeymap; } QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (desktop.state != 0) && (desktopsettings.showfocus)); + if (desktopsettings.rdpsize != null) { d7rdpsize.value = desktopsettings.rdpsize; } + if (desktopsettings.rdpflags == null) { desktopsettings.rdpflags = 0x2F; } + for (var i = 1; i < 10; i++) { if (i != 5) { Q('d7rdp' + i).checked = ((desktopsettings.rdpflags & (1 << (i - 1))) != 0); } } } // Enter browser fullscreen