mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-24 12:44:20 +01:00
html: show message on reconnect success
This commit is contained in:
@@ -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
1075
src/html.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user