diff --git a/Myrtille.Services/RemoteSessionProcess.cs b/Myrtille.Services/RemoteSessionProcess.cs index e2042cd..cd94331 100644 --- a/Myrtille.Services/RemoteSessionProcess.cs +++ b/Myrtille.Services/RemoteSessionProcess.cs @@ -161,7 +161,7 @@ public void StartProcess( // see https://github.com/cedrozor/myrtille/blob/master/DOCUMENTATION.md#build for information and steps to build FreeRDP along with myrtille case HostType.RDP: clientFilePath = @"Myrtille.RDP\FreeRDP"; - clientFileName = "wfreerdp.exe"; + clientFileName = "Securden-RDP-Ancillary.exe"; //"wfreerdp.exe"; break; case HostType.SSH: clientFilePath = @"Myrtille.SSH\bin"; diff --git a/Myrtille.Web/Default.aspx b/Myrtille.Web/Default.aspx index 42a3195..0a3e9a0 100644 --- a/Myrtille.Web/Default.aspx +++ b/Myrtille.Web/Default.aspx @@ -35,7 +35,7 @@ - RDP Session<%=RemoteSession != null && !RemoteSession.ConnectionService && (RemoteSession.State == RemoteSessionState.Connecting || RemoteSession.State == RemoteSessionState.Connected) && !string.IsNullOrEmpty(RemoteSession.ServerAddress) ? (" - " + ((!string.IsNullOrEmpty(RemoteSession.UserDomain))? RemoteSession.UserDomain.ToString() + "\\" : "") + RemoteSession.UserName.ToString() + "@" + RemoteSession.ServerAddress.ToString()) : ""%> + <%=RemoteSession != null && !RemoteSession.ConnectionService && (RemoteSession.State == RemoteSessionState.Connecting || RemoteSession.State == RemoteSessionState.Connected) && !string.IsNullOrEmpty(RemoteSession.ServerAddress) ? (((!string.IsNullOrEmpty(RemoteSession.UserDomain))? RemoteSession.UserDomain.ToString() + "\\" : "") + RemoteSession.UserName.ToString() + "@" + RemoteSession.ServerAddress.ToString() + " | Securden RDP Session") : "Securden RDP Gateway"%> "/> @@ -322,12 +322,12 @@
- - - - - - + + + + + +
Launching Connection
@@ -350,12 +350,63 @@
-
-

. . .

. . .

-
Ctrl+Alt+Delete
-
Clipboard
-
Disconnect
-
+
+ +
+ + + + + + + + + Clipboard +
+ +
+ + + + + + + + + + Run (Win+R) +
+ +
+ + + + + + + + + Ctrl+Alt+Delete +
+ +
+ + + + + + + + + Disconnect +
+ +
+ + + +
+
@@ -423,7 +474,8 @@ } catch (exc) { - alert('myrtille initDisplay error: ' + exc.message); + alert('Unexpected Error'); + console.log('initDisplay error: ' + exc.message); } } diff --git a/Myrtille.Web/css/securden.css b/Myrtille.Web/css/securden.css index e2028f7..01ec769 100644 --- a/Myrtille.Web/css/securden.css +++ b/Myrtille.Web/css/securden.css @@ -141,10 +141,13 @@ span.webrdp-dialog-message-text { } .sec-loading-circle label { - font-size: 20px; + font-size: 0px; opacity: 0; display: inline-block; - width: auto; + width: 7px; + height: 7px; + background-color: #fff; + border-radius: 50%; float: none; margin: 0; } @@ -225,57 +228,63 @@ span.webrdp-dialog-message-text { #remoteOperationsDiv { position: absolute; - z-index: 1000; text-align: center; - width: 125px; - top: 10px; - opacity: .6; - top: 38%; - right: 10px; + height: 56px; + top: -56px; + left: calc(50% - 240px); + opacity: .75; + background-color: #26282a; + transition: top .5s ease-in-out; + z-index: 1000; } #remoteOperationsDiv:hover { opacity: 1; + top: 0 !important; } -#remoteOperationsHeader { - cursor: move; - z-index: 10; - background-color: #2196F3; - color: #fff; +.remote-oper-label-text { float: left; - height: 21px; + text-align: center; + cursor: pointer !important; + font-size: 13px; + color: #ffffff; + padding: 10px 20px 0 20px; + height: 56px; box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #eee; + width: 120px; } - #remoteOperationsHeader p { - position: relative; - float: left; + .remote-oper-label-text span { width: 100%; - line-height: 5px; - padding: 0; - margin: 0; - letter-spacing: 3px; + float: left; + margin-bottom: 1px; } -.remote-oper-label-text { - float: left; - line-height: 40px; - background-color: #f1f1f1; - text-align: center; - width: 100%; - font-size: 13px; - cursor: pointer; - color: #333333; - border-bottom: 1px solid #ddd; +svg { + width: 16px; + height: 16px; + fill: #ffffff; } - .remote-oper-label-text:hover { - color: #ffffff; - background-color: #2096f3; - } +.remote-oper-label-text:hover { + color: #ffffff; + background-color: #2096f3; +} + +.show-icon { + position: absolute; + width: 50px; + height: 24px; + bottom: -24px; + left: 44%; + box-sizing: border-box; + padding-top: 5px; + top: auto; + border-radius: 0 0 3px 3px; + background-color: #1c1e1f; + cursor: move; +} .remote-clip-span { font-weight: normal !important; @@ -313,6 +322,40 @@ span.webrdp-dialog-message-text { color: #666; } +.remote-oper-label-text-icon { + height: 20px; +} + +.remote-oper-label-text-val { + font-size: 12px; + margin-top: 2px; +} + +.clipboard-icon svg { + height: 16px; + width: 16px; +} + +.win-r-icon { + margin-top: -1px; + margin-bottom: 2px !important; +} + +.win-r-icon svg { + height: 20px; + width: 20px; +} + +.ctrl-alt-del-icon svg { + height: 16px; + width: 16px; +} + +.disconnect-icon svg { + height: 15px; + width: 15px; +} + #pasteClipboardPopup { width: 550px !important; height: 260px !important; diff --git a/Myrtille.Web/js/myrtille.js b/Myrtille.Web/js/myrtille.js index 641b4c0..496e683 100644 --- a/Myrtille.Web/js/myrtille.js +++ b/Myrtille.Web/js/myrtille.js @@ -113,7 +113,8 @@ function Myrtille(httpServerUrl, connectionState, statEnabled, debugEnabled, com } catch (exc) { - alert('myrtille init error: ' + exc.message); + alert('Unexpected Error'); + console.log('init error: ' + exc.message); throw exc; } }; @@ -314,7 +315,7 @@ function startMyrtille(connectionState, statEnabled, debugEnabled, compatibility } catch (exc) { - alert('failed to start myrtille: ' + exc.message); + alert('failed to start: ' + exc.message); myrtille = null; } } @@ -496,7 +497,11 @@ this.writeClipboard = function(text) else { dialog.showDebug('async clipboard API is not supported or clipboard write access is denied (do you use HTTPS?)'); - openPopup('copyClipboardPopup', 'CopyClipboard.aspx'); + if (window.clipboardData) { + window.clipboardData.setData("Text", text); + } else { + openPopup('copyClipboardPopup', 'CopyClipboard.aspx'); + } } } catch (exc) @@ -548,7 +553,7 @@ this.sendText = function(text) } } -this.sendKey = function(keyCode, release) +this.sendKey = function(keyCode, release, secondaryKeyCode) { try { @@ -562,9 +567,16 @@ this.sendKey = function(keyCode, release) var keys = new Array(); keys.push(myrtille.getCommandEnum().SEND_KEY_SCANCODE.text + keyCode + '-1'); + if (secondaryKeyCode) { + keys.push(myrtille.getCommandEnum().SEND_KEY_SCANCODE.text + secondaryKeyCode + '-1'); + } - if (release) + if (release) { keys.push(myrtille.getCommandEnum().SEND_KEY_SCANCODE.text + keyCode + '-0'); + if (secondaryKeyCode) { + keys.push(myrtille.getCommandEnum().SEND_KEY_SCANCODE.text + secondaryKeyCode + '-0'); + } + } network.processUserEvent('keyboard', keys.toString()); } @@ -632,6 +644,16 @@ this.sendCtrlAltDel = function () } } +this.sendWinR = function () { + try { + // win + r + sendKey(91, true, 82); + } + catch (exc) { + dialog.showDebug('myrtille sendWinR error: ' + exc.message); + } +} + this.setKeyCombination = function() { try @@ -643,7 +665,7 @@ this.setKeyCombination = function() } catch (exc) { - alert('myrtille setKeyCombination error: ' + exc.message); + alert('setKeyCombination error: ' + exc.message); } } @@ -742,7 +764,7 @@ this.downloadPdf = function(name) } catch (exc) { - alert('myrtille downloadPdf error: ' + exc.message); + alert('downloadPdf error: ' + exc.message); } } @@ -764,7 +786,7 @@ this.printPdf = function() } catch (exc) { - alert('myrtille printPdf error: ' + exc.message); + alert('printPdf error: ' + exc.message); } } @@ -777,7 +799,7 @@ this.writeTerminal = function(data) } catch (exc) { - alert('myrtille writeTerminal error: ' + exc.message); + alert('writeTerminal error: ' + exc.message); } } @@ -791,6 +813,6 @@ this.doDisconnect = function() } catch (exc) { - dialog.showDebug('myrtille doDisconnect error: ' + exc.message); + dialog.showDebug('doDisconnect error: ' + exc.message); } } \ No newline at end of file diff --git a/Myrtille.Web/js/securden.js b/Myrtille.Web/js/securden.js index 2f36c94..d5c29b9 100644 --- a/Myrtille.Web/js/securden.js +++ b/Myrtille.Web/js/securden.js @@ -1,5 +1,6 @@ var disableUserClose = true; var isSessionConnected = false; +var isCloseTabCalled = false; this.isIEBrowserExceptEdge = function () { var ua = navigator.userAgent; @@ -80,11 +81,16 @@ function onSessionDisconnection() { function disconnectSession() { if (confirm("Do you want to disconnect? The remote session will be simply disconnected and not logged out.")) { + disableUserClose = false; doDisconnect(); } } function closeTab() { + if (isCloseTabCalled) { + return; + } + isCloseTabCalled = true; disableUserClose = false; window.close(); hideLoadingDiv(); @@ -94,12 +100,10 @@ function closeTab() { function dragElement(elmnt) { var clientWidth = window.innerWidth; - var clientHeight = window.innerHeight; - var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; - if (document.getElementById(elmnt.id + "header")) { + if (document.getElementById(elmnt.id + "Header")) { /* if present, the header is where you move the DIV from:*/ - document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown; + document.getElementById(elmnt.id + "Header").onmousedown = dragMouseDown; } else { /* otherwise, move the DIV from anywhere inside the DIV:*/ elmnt.onmousedown = dragMouseDown; @@ -125,20 +129,14 @@ function dragElement(elmnt) { pos3 = e.clientX; pos4 = e.clientY; // set the element's new position: - var topPixel = (elmnt.offsetTop - pos2) - if (topPixel > (clientHeight - 145)) { - topPixel = clientHeight - 145; - } else if (topPixel < 0) { - topPixel = 0; + var leftPos = elmnt.offsetLeft - pos1; + if (leftPos > (clientWidth - elmnt.offsetWidth)) { + leftPos = clientWidth - elmnt.offsetWidth; } - elmnt.style.top = topPixel + "px"; - var leftPixel = (elmnt.offsetLeft - pos1) - if (leftPixel > (clientWidth-127)) { - leftPixel = clientWidth - 127; - } else if (leftPixel < 0) { - leftPixel = 0; + if (leftPos < 0) { + leftPos = 0; } - elmnt.style.left = leftPixel + "px"; + elmnt.style.left = leftPos + "px"; } function closeDragElement() { diff --git a/Myrtille.Web/popups/CopyClipboard.aspx b/Myrtille.Web/popups/CopyClipboard.aspx index fbad28a..24ce9e2 100644 --- a/Myrtille.Web/popups/CopyClipboard.aspx +++ b/Myrtille.Web/popups/CopyClipboard.aspx @@ -77,7 +77,7 @@ } else { - alert('IE detected, hit Ctrl+C (Cmd-C on Mac) if you want to synchronize the clipboard'); + //alert('IE detected, hit Ctrl+C (Cmd-C on Mac) if you want to synchronize the clipboard'); } } else diff --git a/Myrtille.Web/popups/PasteClipboard.aspx b/Myrtille.Web/popups/PasteClipboard.aspx index 2e9f667..5d9ce1d 100644 --- a/Myrtille.Web/popups/PasteClipboard.aspx +++ b/Myrtille.Web/popups/PasteClipboard.aspx @@ -110,7 +110,7 @@ } else { - alert('IE detected, hit Ctrl+C (Cmd-C on Mac) if you want to synchronize the clipboard'); + //alert('IE detected, hit Ctrl+C (Cmd-C on Mac) if you want to synchronize the clipboard'); } } else