html: show message on reconnect success

This commit is contained in:
Shuanglei Tao
2020-12-19 12:38:20 +08:00
parent c62de53104
commit 29ef8cbc3b
2 changed files with 544 additions and 534 deletions

View File

@@ -253,7 +253,7 @@ export class Xterm extends Component<Props> {
console.log('[ttyd] websocket connection opened');
this.backoff.reset();
const { socket, textEncoder, terminal, fitAddon } = this;
const { socket, textEncoder, terminal, fitAddon, overlayAddon } = this;
socket.send(textEncoder.encode(JSON.stringify({ AuthToken: this.token })));
if (this.reconnect) {
@@ -261,6 +261,7 @@ export class Xterm extends Component<Props> {
terminal.reset();
terminal.resize(dims.cols, dims.rows);
this.onTerminalResize(dims); // may not be triggered by terminal.resize
overlayAddon.showOverlay('Reconnected', 300);
} else {
this.reconnect = true;
fitAddon.fit();

1075
src/html.h

File diff suppressed because it is too large Load Diff