mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
ref(connectable tab) reconnect context menu & hotkey n°2
This commit is contained in:
parent
1e6f6af5ed
commit
2b5976f202
@ -59,6 +59,8 @@ export class SerialTabComponent extends ConnectableTerminalTabComponent<SerialPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
async initializeSession () {
|
async initializeSession () {
|
||||||
|
super.initializeSession()
|
||||||
|
|
||||||
const session = new SerialSession(this.injector, this.profile)
|
const session = new SerialSession(this.injector, this.profile)
|
||||||
this.setSession(session)
|
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 () {
|
async changeBaudRate () {
|
||||||
const rate = await this.selector.show(
|
const rate = await this.selector.show(
|
||||||
this.translate.instant(_('Baud rate')),
|
this.translate.instant(_('Baud rate')),
|
||||||
|
@ -212,12 +212,6 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
|
|||||||
modal.session = this.sshSession!
|
modal.session = this.sshSession!
|
||||||
}
|
}
|
||||||
|
|
||||||
async reconnect (): Promise<void> {
|
|
||||||
this.session?.destroy()
|
|
||||||
await this.initializeSession()
|
|
||||||
this.session?.releaseInitialDataBuffer()
|
|
||||||
}
|
|
||||||
|
|
||||||
async canClose (): Promise<boolean> {
|
async canClose (): Promise<boolean> {
|
||||||
if (!this.session?.open) {
|
if (!this.session?.open) {
|
||||||
return true
|
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> {
|
async canClose (): Promise<boolean> {
|
||||||
if (!this.session?.open) {
|
if (!this.session?.open) {
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user