1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-22 18:11:43 +03:00
tabby/terminus-ssh/src/recoveryProvider.ts
Eugene Pankov 174a1bcca7
remote pty
2021-04-04 20:07:57 +02:00

23 lines
708 B
TypeScript

import { Injectable } from '@angular/core'
import { TabRecoveryProvider, RecoveredTab, RecoveryToken } from 'terminus-core'
import { SSHTabComponent } from './components/sshTab.component'
/** @hidden */
@Injectable()
export class RecoveryProvider extends TabRecoveryProvider {
async applicableTo (recoveryToken: RecoveryToken): Promise<boolean> {
return recoveryToken.type === 'app:ssh-tab'
}
async recover (recoveryToken: RecoveryToken): Promise<RecoveredTab> {
return {
type: SSHTabComponent,
options: {
connection: recoveryToken['connection'],
savedState: recoveryToken['savedState'],
},
}
}
}