mirror of
https://github.com/Eugeny/tabby
synced 2024-12-04 18:40:16 +00:00
ref(connectable tab) reconnect context menu & hotkey n°2
This commit is contained in:
parent
1e6f6af5ed
commit
2b5976f202
3 changed files with 2 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue