This commit is contained in:
Clem Fern
2023-05-12 19:46:43 +02:00
parent 312b365851
commit 38302622b8
5 changed files with 9 additions and 9 deletions

View File

@@ -86,7 +86,7 @@ export class SerialTabComponent extends ConnectableTerminalTabComponent<SerialPr
super.attachSessionHandlers() super.attachSessionHandlers()
} }
protected onSessionDestroyed() { protected onSessionDestroyed (): void {
if (this.frontend) { if (this.frontend) {
// Session was closed abruptly // Session was closed abruptly
this.write('\r\n' + colors.black.bgWhite(' SERIAL ') + ` session closed\r\n`) this.write('\r\n' + colors.black.bgWhite(' SERIAL ') + ` session closed\r\n`)

View File

@@ -148,7 +148,7 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
return session return session
} }
protected onSessionDestroyed() { protected onSessionDestroyed (): void {
if (this.frontend) { if (this.frontend) {
// Session was closed abruptly // Session was closed abruptly
this.write('\r\n' + colors.black.bgWhite(' SSH ') + ` ${this.sshSession?.profile.options.host}: session closed\r\n`) this.write('\r\n' + colors.black.bgWhite(' SSH ') + ` ${this.sshSession?.profile.options.host}: session closed\r\n`)

View File

@@ -42,7 +42,7 @@ export class TelnetTabComponent extends ConnectableTerminalTabComponent<TelnetPr
super.onFrontendReady() super.onFrontendReady()
} }
protected onSessionDestroyed() { protected onSessionDestroyed (): void {
if (this.frontend) { if (this.frontend) {
// Session was closed abruptly // Session was closed abruptly
this.write('\r\n' + colors.black.bgWhite(' TELNET ') + ` ${this.session?.profile.options.host}: session closed\r\n`) this.write('\r\n' + colors.black.bgWhite(' TELNET ') + ` ${this.session?.profile.options.host}: session closed\r\n`)

View File

@@ -796,7 +796,7 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
/** /**
* Method called when session is destroyed. Set the session to null * Method called when session is destroyed. Set the session to null
*/ */
protected onSessionDestroyed() { protected onSessionDestroyed (): void {
this.setSession(null) this.setSession(null)
} }

View File

@@ -36,7 +36,7 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
/** /**
* Method called when session is destroyed. Handle the tab behavior on session end for connectable tab * Method called when session is destroyed. Handle the tab behavior on session end for connectable tab
*/ */
protected onSessionDestroyed() { protected onSessionDestroyed (): void {
super.onSessionDestroyed() super.onSessionDestroyed()
if (this.frontend) { if (this.frontend) {
@@ -52,7 +52,7 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
* Offering reconnection to the user if it hasn't been done yet. * Offering reconnection to the user if it hasn't been done yet.
* Set reconnectOffered to true * Set reconnectOffered to true
*/ */
offerReconnection () { offerReconnection (): void {
if (!this.reconnectOffered) { if (!this.reconnectOffered) {
this.reconnectOffered = true this.reconnectOffered = true
this.write(this.translate.instant(_('Press any key to reconnect')) + '\r\n') this.write(this.translate.instant(_('Press any key to reconnect')) + '\r\n')