1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved MeshCmd.

This commit is contained in:
Ylian Saint-Hilaire 2018-02-07 18:45:14 -08:00
parent 143d4cb647
commit 2a835d25cd
20 changed files with 174 additions and 121 deletions

View file

@ -99,11 +99,8 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) {
if (obj.webrtc != null) {
obj.webchannel = obj.webrtc.createDataChannel("DataChannel", {}); // { ordered: false, maxRetransmits: 2 }
obj.webchannel.onmessage = function (event) { obj.xxOnMessage({ data: event.data }); };
obj.webchannel.onopen = function () {
obj.webRtcActive = true;
performWebRtcSwitch();
};
obj.webchannel.onclose = function (event) { /*console.log('WebRTC close');*/ obj.Stop(); }
obj.webchannel.onopen = function () { obj.webRtcActive = true; performWebRtcSwitch(); };
obj.webchannel.onclose = function (event) { /*console.log('WebRTC close');*/ if (obj.webRtcActive) { obj.Stop(); } }
obj.webrtc.onicecandidate = function (e) {
if (e.candidate == null) {
obj.socket.send(JSON.stringify(obj.webrtcoffer)); // End of candidates, send the offer

View file

@ -17,6 +17,8 @@ var CreateAmtRemoteTerminal = function (divid) {
obj.width = 80; // 80 or 100
obj.height = 25; // 25 or 30
obj.lineFeed = '\r\n';
var _Terminal_CellHeight = 21;
var _Terminal_CellWidth = 13;
var _TermColors = ['000000', 'BB0000', '00BB00', 'BBBB00', '0000BB', 'BB00BB', '00BBBB', 'BBBBBB', '555555', 'FF5555', '55FF55', 'FFFF55', '5555FF', 'FF55FF', '55FFFF', 'FFFFFF'];
@ -574,7 +576,7 @@ var CreateAmtRemoteTerminal = function (divid) {
obj.TermHandleKeys = function (e) {
if (!e.ctrlKey) {
if (e.which == 127) obj.TermSendKey(8);
else if (e.which == 13) obj.TermSendKeys("\r\n");
else if (e.which == 13) obj.TermSendKeys(obj.lineFeed);
else if (e.which != 0) obj.TermSendKey(e.which);
return false;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long