From e0ee698e2ae505a2e41628f2728291584a96da05 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 18 Sep 2018 14:47:17 -0700 Subject: [PATCH] More user interface improvements --- package.json | 2 +- public/images/views.png | Bin 0 -> 1149 bytes public/scripts/agent-desktop-0.0.2.js | 10 ++-- public/scripts/amt-terminal-0.0.2.js | 3 +- public/styles/style.css | 55 +++++++++++++++++- views/default.handlebars | 79 +++++++++++++++++++------- 6 files changed, 121 insertions(+), 28 deletions(-) create mode 100644 public/images/views.png diff --git a/package.json b/package.json index 250968c3..d7563e86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.0-m", + "version": "0.2.0-o", "keywords": [ "Remote Management", "Intel AMT", diff --git a/public/images/views.png b/public/images/views.png new file mode 100644 index 0000000000000000000000000000000000000000..cf8666e77a15bb222dd867f08f1ad0ccdb28a2bc GIT binary patch literal 1149 zcmV-@1cLjCP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y1MW#gK~!i%?V9T=JYf{aU6Xj>nroC$E+M59 zDWMP&xfLaZlqg9`$xF!_UJ1!1DMIe|f9?Bw&Z!;qd-m*_owclKUVNG}=R9Z5&Yaoj zIp^7p0O0b65tS~X=kf6oYinz0Z*NCgSsB{e+OWF1io3fzWtM#;M5Rk;+1=emO-&7w zlaolqr*w|3RWM3Uo=@L3_Zf-b9IXO9?M4D|!M@Pud&qqN) z0nX3Q|Fii*RJw$Y`T2RIrlw+le_x$?+t1FTTCCgucE$#Ky)dO~kho zA0LmClM@x@GqBZo9$zH~>|>6%v$Ml*wlv;DWMm|2Yin_Pd&|Cde7=Ilwzjq^QMMC9 zLqjMnEmfjyH)9AbEiGOj?mIa=JXB#m0|ye1eAO{vA9FlxHu)sb~A=BHa5miF)=aUPGVvrPESu&n9smg<9U45Lkif(9M4YjgLz?m zLF->{Z?6(%J25dafxNstCCYX)qSA?kO9DqnM>#o{mzV0)+fHo+O`qM}-Rjiat|Ka) zNVp`B*5=&YT-4Xsyy4SXhY3$w_YL zXJ%&jn@9SQkrBMVzpJ6LzZpXajsIGw1dC>$Rjv#%W=E4;qG z@;WG8i|+CH`B@E0_mF4#KHm0Yi(b(9C zqM{CR3x|%nx4-O90Fxl51qSA@{WCE!Wd3t){b#Z-totyK7gapygOi4)z{}xEo z>f76!aXo*CN+!R6&;pIdGo48iF|4Eai9b%Jf= zX*-Oj$)uztajYHa?-ul9FRhjOdT9uOylr;S*N8yhZgsRhr4c{f$kRDZpZ)#)C@wDM zRzdolR*8;|<|%e~co>_Tn_T=*93!C9i 1) { console.log("KSend(" + x.length + "): " + rstr2hex(x)); } obj.parent.send(x); } @@ -159,7 +159,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.ProcessScreenMsg = function (width, height) { - if (obj.debugmode == 1) { console.log("ScreenSize: " + width + " x " + height); } + if (obj.debugmode > 0) { console.log("ScreenSize: " + width + " x " + height); } obj.Canvas.setTransform(1, 0, 0, 1, 0, 0); obj.rotation = 0; obj.FirstDraw = true; @@ -178,19 +178,19 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.ProcessDataEx = function (str) { + if (obj.debugmode > 1) { console.log("KRecv(" + str.length + "): " + rstr2hex(str.substring(0, Math.min(str.length, 40)))); } if (str.length < 4) return; var cmdmsg = null, X = 0, Y = 0, command = ReadShort(str, 0), cmdsize = ReadShort(str, 2); - if ((cmdsize != str.length) && (obj.debugmode == 1)) { console.log(cmdsize, str.length, cmdsize == str.length); } + if ((cmdsize != str.length) && (obj.debugmode > 0)) { console.log(cmdsize, str.length, cmdsize == str.length); } if (command >= 18) { console.error("Invalid KVM command " + command + " of size " + cmdsize); console.log("Invalid KVM data", str.length, str, rstr2hex(str)); return; } if (cmdsize > str.length) { console.error("KVM invalid command size", cmdsize, str.length); return; } //meshOnDebug("KVM Command: " + command + " Len:" + cmdsize); - //if (obj.debugmode == 1) { console.log("KVM Command: " + command + " Len:" + cmdsize); } if (command == 3 || command == 4 || command == 7) { cmdmsg = str.substring(4, cmdsize); X = ((cmdmsg.charCodeAt(0) & 0xFF) << 8) + (cmdmsg.charCodeAt(1) & 0xFF); Y = ((cmdmsg.charCodeAt(2) & 0xFF) << 8) + (cmdmsg.charCodeAt(3) & 0xFF); - if (obj.debugmode == 1) { console.log("CMD" + command + " at X=" + X + " Y=" + Y); } + if (obj.debugmode > 0) { console.log("CMD" + command + " at X=" + X + " Y=" + Y); } } switch (command) { diff --git a/public/scripts/amt-terminal-0.0.2.js b/public/scripts/amt-terminal-0.0.2.js index ce975fb1..6bdb123a 100644 --- a/public/scripts/amt-terminal-0.0.2.js +++ b/public/scripts/amt-terminal-0.0.2.js @@ -14,10 +14,10 @@ var CreateAmtRemoteTerminal = function (divid) { obj.terminalEmulation = 1; // ###END###{Terminal-Enumation-All} obj.fxEmulation = 0; + obj.lineFeed = '\r\n'; obj.width = 80; // 80 or 100 obj.height = 25; // 25 or 30 - obj.lineFeed = '\r\n'; var _Terminal_CellHeight = 21; var _Terminal_CellWidth = 13; @@ -414,6 +414,7 @@ var CreateAmtRemoteTerminal = function (divid) { _TermMoveUp(1); _termy = (obj.height - 1); } + if (obj.lineFeed = '\n') { _termx = 0; } // *** If we are in Linux mode, \n will also return the cursor to the first col break; case '\r': // Carriage Return _termx = 0; diff --git a/public/styles/style.css b/public/styles/style.css index f8177e21..96c05c1e 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -447,7 +447,6 @@ a { .e2 { float: left; height: 100%; - width: 201px; background-color: #c9c9c9; } @@ -604,3 +603,57 @@ a { padding-top: 4px; padding-bottom: 4px; } + +.viewSelector { + width:32px; + height:32px; + background-color:#DDD; + border-radius:3px; + float:left; + margin-left:5px; + cursor: pointer; + opacity: 0.3; +} + +.viewSelectorSel { + background-color:#BBB; + opacity: 0.8; +} + + .viewSelector:hover { + opacity: 0.5; + background-color:#AAA; + } + + +.viewSelector1 { + margin-left:2px; + margin-top:2px; + background: url(../images/views.png) -0px 0px; + height: 28px; + width: 28px; +} + +.viewSelector2 { + margin-left:2px; + margin-top:2px; + background: url(../images/views.png) -28px 0px; + height: 28px; + width: 28px; +} + +.viewSelector3 { + margin-left:2px; + margin-top:2px; + background: url(../images/views.png) -56px 0px; + height: 28px; + width: 28px; +} + +.viewSelector4 { + margin-left:2px; + margin-top:2px; + background: url(../images/views.png) -84px 0px; + height: 28px; + width: 28px; +} \ No newline at end of file diff --git a/views/default.handlebars b/views/default.handlebars index fa08143b..250f7356 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -143,7 +143,12 @@
Server disconnected, click to reconnect.