mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-22 18:11:43 +03:00
23 lines
708 B
TypeScript
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'],
|
|
},
|
|
}
|
|
}
|
|
}
|