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

Updated xterm.js

This commit is contained in:
Ylian Saint-Hilaire 2022-10-23 09:46:02 -07:00
parent 90e271df97
commit d99755f223
6 changed files with 57 additions and 20 deletions

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

View file

@ -36,7 +36,7 @@
*/ */
.xterm { .xterm {
font-feature-settings: "liga" 0; cursor: text;
position: relative; position: relative;
user-select: none; user-select: none;
-ms-user-select: none; -ms-user-select: none;
@ -59,10 +59,10 @@
} }
.xterm .xterm-helper-textarea { .xterm .xterm-helper-textarea {
/* padding: 0;
* HACK: to fix IE's blinking cursor border: 0;
* Move textarea out of the screen to the far left, so that the cursor is not visible. margin: 0;
*/ /* Move textarea out of the screen to the far left, so that the cursor is not visible */
position: absolute; position: absolute;
opacity: 0; opacity: 0;
left: -9999em; left: -9999em;
@ -125,16 +125,13 @@
line-height: normal; line-height: normal;
} }
.xterm {
cursor: text;
}
.xterm.enable-mouse-events { .xterm.enable-mouse-events {
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */ /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
cursor: default; cursor: default;
} }
.xterm.xterm-cursor-pointer { .xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
cursor: pointer; cursor: pointer;
} }
@ -166,6 +163,30 @@
opacity: 0.5; opacity: 0.5;
} }
.xterm-underline { .xterm-underline-1 { text-decoration: underline; }
text-decoration: underline; .xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }
.xterm-strikethrough {
text-decoration: line-through;
}
.xterm-screen .xterm-decoration-container .xterm-decoration {
z-index: 6;
position: absolute;
}
.xterm-decoration-overview-ruler {
z-index: 7;
position: absolute;
top: 0;
right: 0;
pointer-events: none;
}
.xterm-decoration-top {
z-index: 2;
position: relative;
} }

View file

@ -947,7 +947,7 @@
</div> </div>
<div id="termarea3" style="width:100%;height: calc(100% - 60px);" cellpadding=0 cellspacing=0> <div id="termarea3" style="width:100%;height: calc(100% - 60px);" cellpadding=0 cellspacing=0>
<div id="termarea3x" style="width:100%;height:100%"> <div id="termarea3x" style="width:100%;height:100%">
<div style="width:100%;height:100%" id="termarea3xdiv"></div> <div style="width:100%;height:100%;text-align:left" id="termarea3xdiv"></div>
</div> </div>
</div> </div>
<div id="termarea4" style="position:relative;height:32px;"> <div id="termarea4" style="position:relative;height:32px;">
@ -4806,7 +4806,16 @@
return obj; return obj;
} }
function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } } function tunnelUpdate(data) {
if (xterm != null) {
if (xterm.writeUtf8) {
if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); }
} else {
if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); }
}
}
}
//function tunnelUpdate(data) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } }
function sshTunnelAuthDialog(j, func) { function sshTunnelAuthDialog(j, func) {
var x = ''; var x = '';
@ -5021,7 +5030,7 @@
xterm = new Terminal(); xterm = new Terminal();
xtermfit = new FitAddon.FitAddon(); xtermfit = new FitAddon.FitAddon();
if (xtermfit) { xterm.loadAddon(xtermfit); } if (xtermfit) { xterm.loadAddon(xtermfit); }
xterm.setOption('scrollback', 0); //xterm.setOption('scrollback', 0);
//xterm.setOption('fontSize', 15); //xterm.setOption('fontSize', 15);
xterm.open(Q('termarea3xdiv')); xterm.open(Q('termarea3xdiv'));
xterm.onData(function (data) { if (terminal.urlname == 'sshterminalrelay.ashx') { terminal.socket.send('~' + data); } else { terminal.sendText(data); } }) xterm.onData(function (data) { if (terminal.urlname == 'sshterminalrelay.ashx') { terminal.socket.send('~' + data); } else { terminal.sendText(data); } })

View file

@ -775,7 +775,7 @@
</tr> </tr>
<tr> <tr>
<td id="termarea3x"> <td id="termarea3x">
<div id="termarea3xdiv" style="width:100%;height:100%"></div> <div id="termarea3xdiv" style="width:100%;height:100%;text-align:left"></div>
<pre id="Term"></pre> <pre id="Term"></pre>
</td> </td>
</tr> </tr>
@ -10130,7 +10130,15 @@
return obj; return obj;
} }
function tunnelUpdate(data) { if (xterm != null) { if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); } } } function tunnelUpdate(data) {
if (xterm != null) {
if (xterm.writeUtf8) {
if (typeof data == 'string') { xterm.writeUtf8(data); } else { xterm.writeUtf8(new Uint8Array(data)); }
} else {
if (typeof data == 'string') { xterm.write(data); } else { xterm.write(new Uint8Array(data)); }
}
}
}
function sshTunnelAuthDialog(j, func) { function sshTunnelAuthDialog(j, func) {
var x = ''; var x = '';