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

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

No files matched your search

@@ -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')),
@@ -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
@@ -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