ref(connectable tab) reconnect context menu & hotkey n°2

This commit is contained in:
Clem Fern 2023-05-12 19:30:24 +02:00
parent 1e6f6af5ed
commit 2b5976f202
3 changed files with 2 additions and 18 deletions

View file

@ -59,6 +59,8 @@ export class SerialTabComponent extends ConnectableTerminalTabComponent<SerialPr
}
async initializeSession () {
super.initializeSession()
const session = new SerialSession(this.injector, this.profile)
this.setSession(session)
@ -104,12 +106,6 @@ export class SerialTabComponent extends ConnectableTerminalTabComponent<SerialPr
}
}
async reconnect (): Promise<void> {
this.session?.destroy()
await this.initializeSession()
this.session?.releaseInitialDataBuffer()
}
async changeBaudRate () {
const rate = await this.selector.show(
this.translate.instant(_('Baud rate')),

View file

@ -212,12 +212,6 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
modal.session = this.sshSession!
}
async reconnect (): Promise<void> {
this.session?.destroy()
await this.initializeSession()
this.session?.releaseInitialDataBuffer()
}
async canClose (): Promise<boolean> {
if (!this.session?.open) {
return true

View file

@ -94,12 +94,6 @@ export class TelnetTabComponent extends ConnectableTerminalTabComponent<TelnetPr
}
}
async reconnect (): Promise<void> {
this.session?.destroy()
await this.initializeSession()
this.session?.releaseInitialDataBuffer()
}
async canClose (): Promise<boolean> {
if (!this.session?.open) {
return true