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

Partial web page multi-language support done.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-17 17:13:55 -07:00
parent 9b321876da
commit c5c5156c12
6 changed files with 638 additions and 644 deletions

View file

@ -165,28 +165,28 @@
try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
var x = '';
x += addInfo('Time', recFileMetadata.time);
if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo('Duration', secs + ' second' + ((secs > 1) ? 's' : '')); }
x += addInfo('Username', recFileMetadata.username);
x += addInfo('UserID', recFileMetadata.userid);
x += addInfo('SessionID', recFileMetadata.sessionid);
if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo('Addresses', recFileMetadata.ipaddr1 + ' to ' + recFileMetadata.ipaddr2); }
if (recFileMetadata.devicename) { x += addInfo('DeviceName', recFileMetadata.devicename); }
x += addInfo('NodeID', recFileMetadata.nodeid);
x += addInfo("Time", recFileMetadata.time);
if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Duration", format("{0} second{1}", secs, (secs > 1) ? 's' : '')); }
x += addInfo("Username", recFileMetadata.username);
x += addInfo("UserID", recFileMetadata.userid);
x += addInfo("SessionID", recFileMetadata.sessionid);
if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Addresses", format("{0} to {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
if (recFileMetadata.devicename) { x += addInfo("DeviceName", recFileMetadata.devicename); }
x += addInfo("NodeID", recFileMetadata.nodeid);
if (recFileMetadata.protocol) {
var p = recFileMetadata.protocol;
if (p == 1) { p = 'MeshCentral Terminal'; }
else if (p == 2) { p = 'MeshCentral Desktop'; }
else if (p == 100) { p = 'Intel® AMT WSMAN'; }
else if (p == 101) { p = 'Intel® AMT Redirection'; }
x += addInfoNoEsc('Protocol', p);
if (p == 1) { p = "MeshCentral Terminal"; }
else if (p == 2) { p = "MeshCentral Desktop"; }
else if (p == 100) { p = "Intel® AMT WSMAN"; }
else if (p == 101) { p = "Intel® AMT Redirection"; }
x += addInfoNoEsc("Protocol", p);
}
QV('DeskParent', true);
QV('TermParent', false);
if (recFileMetadata.protocol == 1) {
// MeshCentral remote terminal
recFileProtocol = 1;
x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
x += '<br /><br /><span style=color:gray>' + "Press [space] to play/pause." + '</span>';
QE('PlayButton', true);
QE('PauseButton', false);
QE('RestartButton', false);
@ -195,7 +195,7 @@
else if (recFileMetadata.protocol == 2) {
// MeshCentral remote desktop
recFileProtocol = 2;
x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
x += '<br /><br /><span style=color:gray>' + "Press [space] to play/pause." + '</span>';
QE('PlayButton', true);
QE('PauseButton', false);
QE('RestartButton', false);
@ -301,7 +301,7 @@
QS('progressbar').width = '0px';
QH('timespan', '00:00:00');
QV('metadatadiv', true);
QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>');
QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Drag & drop a .mcrec file or click \"Open File...\"" + '</span>');
QV('DeskParent', true);
QV('TermParent', false);
}
@ -529,10 +529,9 @@
function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
function pad2(num) { var s = "00" + num; return s.substr(s.length - 2); }
function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
start();
</script>