mirror of
https://github.com/Eugeny/tabby
synced 2025-01-20 17:14:25 +00:00
18 lines
604 B
TypeScript
18 lines
604 B
TypeScript
import { Injectable } from '@angular/core'
|
|
import { TabRecoveryProvider, RecoveredTab } from 'terminus-core'
|
|
|
|
import { TerminalTabComponent } from './components/terminalTab.component'
|
|
|
|
/** @hidden */
|
|
@Injectable()
|
|
export class RecoveryProvider extends TabRecoveryProvider {
|
|
async recover (recoveryToken: any): Promise<RecoveredTab> {
|
|
if (recoveryToken && recoveryToken.type === 'app:terminal-tab') {
|
|
return {
|
|
type: TerminalTabComponent,
|
|
options: { sessionOptions: recoveryToken.sessionOptions },
|
|
}
|
|
}
|
|
return null
|
|
}
|
|
}
|