Skip to content

Commit

Permalink
SecurdenRDP - Dropdown & Ancillory related changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathy365 committed May 5, 2020
1 parent 506842e commit 330caa8
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Myrtille.Services/RemoteSessionProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
80 changes: 66 additions & 14 deletions Myrtille.Web/Default.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- mobile devices -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0"/>

<title>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()) : ""%></title>
<title><%=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"%></title>

<link rel="icon" type="image/x-icon" href="favicon.ico"/>
<link rel="stylesheet" type="text/css" href="<%=BundleTable.Bundles.ResolveBundleUrl("~/css/Default.css", true)%>"/>
Expand Down Expand Up @@ -322,12 +322,12 @@
<div runat="server" id="loadingDiv" visible="False">
<div class="sec-loading-wrap">
<div class="sec-loading-circle">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
<div class="loading-text">Launching Connection</div>
</div>
Expand All @@ -350,12 +350,63 @@
</div>

<div runat="server" id="remoteOperationsDivWrap" visible="False">
<div runat="server" id="remoteOperationsDiv">
<div id="remoteOperationsHeader" title="Click to drag"><p>. . .</p><p>. . .</p></div>
<div class="remote-oper-label-text" onclick="sendCtrlAltDel();">Ctrl+Alt+Delete</div>
<div class="remote-oper-label-text" onclick="openPopup('pasteClipboardPopup', 'PasteClipboard.aspx');">Clipboard</div>
<div class="remote-oper-label-text" onclick="disconnectSession();">Disconnect</div>
</div>
<div runat="server" id="remoteOperationsDiv">

<div class="remote-oper-label-text" onclick="openPopup('pasteClipboardPopup', 'PasteClipboard.aspx');">
<span class="remote-oper-label-text-icon clipboard-icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<g>
<path d="M24.3,4.2h-1.5V3.7c0-0.6-0.5-1.1-1.1-1.1h-2c-0.7-1.5-2.2-2.5-3.9-2.5s-3.2,1-3.9,2.5H9.5c-0.6,0-1.1,0.5-1.1,1.1v0.5H6.9 c-1.8,0-3.3,1.5-3.3,3.2v21.1c0,1.8,1.5,3.2,3.3,3.2h17.5c1.8,0,3.2-1.5,3.2-3.2v-21C27.6,5.7,26.1,4.2,24.3,4.2z M10.6,4.9h2.1 h0.1c0.1,0,0.1,0,0.2,0c0.1,0,0.2-0.1,0.2-0.1c0.1,0,0.1-0.1,0.2-0.1c0.1-0.1,0.1-0.1,0.2-0.2c0-0.1,0.1-0.1,0.1-0.2 s0.1-0.1,0.1-0.2V4c0.2-0.9,1-1.6,2-1.6s1.8,0.7,2,1.6v0.1c0,0.1,0,0.1,0.1,0.2c0,0.1,0.1,0.1,0.1,0.2l0.1,0.1 c0.1,0.1,0.1,0.1,0.2,0.2l0.1,0.1C18.5,5,18.7,5,18.8,5l0,0l0,0h1.7v2.5h-9.9C10.6,7.5,10.6,4.9,10.6,4.9z M25.3,28.5 c0,0.5-0.4,1-1,1H6.9c-0.5,0-1-0.4-1-1v-21c0-0.5,0.4-1,1-1h1.5v2.1c0,0.6,0.5,1.1,1.1,1.1h12.2c0.6,0,1.1-0.5,1.1-1.1V6.5h1.5 c0.5,0,1,0.4,1,1C25.3,7.5,25.3,28.5,25.3,28.5z"></path>

</g>
</svg>
</span>
<span class="remote-oper-label-text-val">Clipboard</span>
</div>

<div class="remote-oper-label-text" onclick="sendWinR();">
<span class="remote-oper-label-text-icon win-r-icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<g>
<path d="M7.5,5.2L1,26.7h24l6.5-21.6L7.5,5.2L7.5,5.2z M23.5,24.6H4.1l5-17.3h19.4L23.5,24.6z"/>
<path d="M11.9,10.7l-3,10.6h11.7l3-10.6C23.6,10.7,11.9,10.7,11.9,10.7z M20.2,17.2l-8.7,0.1l1.5-4.9h8.6L20.2,17.2z"/>
<polygon points="12.7,16.5 14.8,16.5 15.8,13.4 13.8,13.4 "/>
</g>
</svg>
</span>
<span class="remote-oper-label-text-val">Run (Win+R)</span>
</div>

<div class="remote-oper-label-text" onclick="sendCtrlAltDel();">
<span class="remote-oper-label-text-icon ctrl-alt-del-icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 32 32" style="enable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0C16.9,27.4,17,27.4,17.1,27.4z"></path>
<path d="M16,23.6c-4.2,0-7.6-3.4-7.6-7.6s3.4-7.6,7.6-7.6s7.6,3.4,7.6,7.6S20.2,23.6,16,23.6z M16,10.5c-3,0-5.5,2.5-5.5,5.5 s2.5,5.5,5.5,5.5s5.5-2.5,5.5-5.5C21.5,12.9,19,10.5,16,10.5z"></path>
</g>
</svg>
</span>
<span class="remote-oper-label-text-val">Ctrl+Alt+Delete</span>
</div>

<div class="remote-oper-label-text" onclick="disconnectSession();">
<span class="remote-oper-label-text-icon disconnect-icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<g>
<path d="M23.7,23c-0.9,0-1.6,0.7-1.6,1.6v3.6H3.4V5h18.8v2.6c0,0.9,0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6V3.4c0-0.9-0.7-1.6-1.6-1.6H1.9 C1,1.8,0.3,2.5,0.3,3.4v26.3c0,0.9,0.7,1.6,1.6,1.6h21.9c0.9,0,1.6-0.7,1.6-1.6v-5.2C25.3,23.6,24.6,23,23.7,23z"/>
<polygon points="31.6,16.1 29.5,13.9 29.5,13.9 26,10.4 23.9,12.5 25.9,14.6 12,14.6 12,17.6 25.9,17.6 23.8,19.7 25.9,21.8 29.5,18.2 29.5,18.2 31.6,16.1 31.6,16.1 "/>
</g>
</svg>
</span>
<span class="remote-oper-label-text-val">Disconnect</span>
</div>

<div class="show-icon" id="remoteOperationsDivHeader" title="Click to drag">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
<polygon points="60.9,20 56.6,15.7 32.6,39.8 8.6,15.7 4.3,20 28.3,44 28.3,44 32.6,48.3 32.6,48.2 32.6,48.3 36.9,44 36.8,44 "></polygon>
</svg>
</div>
</div>
<script type="text/javascript">
dragElement(document.getElementById("remoteOperationsDiv"));
</script>
Expand Down Expand Up @@ -423,7 +474,8 @@
}
catch (exc)
{
alert('myrtille initDisplay error: ' + exc.message);
alert('Unexpected Error');
console.log('initDisplay error: ' + exc.message);
}
}
Expand Down
117 changes: 80 additions & 37 deletions Myrtille.Web/css/securden.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
42 changes: 32 additions & 10 deletions Myrtille.Web/js/myrtille.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -548,7 +553,7 @@ this.sendText = function(text)
}
}

this.sendKey = function(keyCode, release)
this.sendKey = function(keyCode, release, secondaryKeyCode)
{
try
{
Expand All @@ -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());
}
Expand Down Expand Up @@ -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
Expand All @@ -643,7 +665,7 @@ this.setKeyCombination = function()
}
catch (exc)
{
alert('myrtille setKeyCombination error: ' + exc.message);
alert('setKeyCombination error: ' + exc.message);
}
}

Expand Down Expand Up @@ -742,7 +764,7 @@ this.downloadPdf = function(name)
}
catch (exc)
{
alert('myrtille downloadPdf error: ' + exc.message);
alert('downloadPdf error: ' + exc.message);
}
}

Expand All @@ -764,7 +786,7 @@ this.printPdf = function()
}
catch (exc)
{
alert('myrtille printPdf error: ' + exc.message);
alert('printPdf error: ' + exc.message);
}
}

Expand All @@ -777,7 +799,7 @@ this.writeTerminal = function(data)
}
catch (exc)
{
alert('myrtille writeTerminal error: ' + exc.message);
alert('writeTerminal error: ' + exc.message);
}
}

Expand All @@ -791,6 +813,6 @@ this.doDisconnect = function()
}
catch (exc)
{
dialog.showDebug('myrtille doDisconnect error: ' + exc.message);
dialog.showDebug('doDisconnect error: ' + exc.message);
}
}
Loading

0 comments on commit 330caa8

Please sign in to comment.