mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-30 08:19:54 +00:00
ref(connectable tab) getRecoveryToken method
This commit is contained in:
parent
bd4b11813c
commit
38b8702373
@ -90,14 +90,6 @@ export class SerialTabComponent extends ConnectableTerminalTabComponent<SerialPr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<any> {
|
|
||||||
return {
|
|
||||||
type: 'app:serial-tab',
|
|
||||||
profile: this.profile,
|
|
||||||
savedState: options?.includeState && this.frontend?.saveState(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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')),
|
||||||
|
@ -186,14 +186,6 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<RecoveryToken> {
|
|
||||||
return {
|
|
||||||
type: 'app:ssh-tab',
|
|
||||||
profile: this.profile,
|
|
||||||
savedState: options?.includeState && this.frontend?.saveState(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showPortForwarding (): void {
|
showPortForwarding (): void {
|
||||||
const modal = this.ngbModal.open(SSHPortForwardingModalComponent).componentInstance as SSHPortForwardingModalComponent
|
const modal = this.ngbModal.open(SSHPortForwardingModalComponent).componentInstance as SSHPortForwardingModalComponent
|
||||||
modal.session = this.sshSession!
|
modal.session = this.sshSession!
|
||||||
|
@ -73,14 +73,6 @@ export class TelnetTabComponent extends ConnectableTerminalTabComponent<TelnetPr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<RecoveryToken> {
|
|
||||||
return {
|
|
||||||
type: 'app:telnet-tab',
|
|
||||||
profile: this.profile,
|
|
||||||
savedState: options?.includeState && this.frontend?.saveState(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async canClose (): Promise<boolean> {
|
async canClose (): Promise<boolean> {
|
||||||
if (!this.session?.open) {
|
if (!this.session?.open) {
|
||||||
return true
|
return true
|
||||||
|
@ -6,6 +6,8 @@ import { first } from 'rxjs'
|
|||||||
|
|
||||||
import { BaseTerminalProfile } from './interfaces'
|
import { BaseTerminalProfile } from './interfaces'
|
||||||
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
import { BaseTerminalTabComponent } from './baseTerminalTab.component'
|
||||||
|
import { GetRecoveryTokenOptions } from 'tabby-core'
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class to base your custom connectable terminal tabs on
|
* A class to base your custom connectable terminal tabs on
|
||||||
@ -69,6 +71,14 @@ export abstract class ConnectableTerminalTabComponent<P extends BaseTerminalProf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<any> {
|
||||||
|
return {
|
||||||
|
type: `app:${this.profile.type}-tab`,
|
||||||
|
profile: this.profile,
|
||||||
|
savedState: options?.includeState && this.frontend?.saveState(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async reconnect (): Promise<void> {
|
async reconnect (): Promise<void> {
|
||||||
this.session?.destroy()
|
this.session?.destroy()
|
||||||
await this.initializeSession()
|
await this.initializeSession()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user