mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-14 16:40:05 +00:00
28 lines
620 B
TypeScript
28 lines
620 B
TypeScript
import { Tab, ComponentType } from 'api/tab'
|
|
import { TerminalTabComponent } from './components/terminalTab'
|
|
import { Session } from './services/sessions'
|
|
|
|
|
|
export class TerminalTab extends Tab {
|
|
static recoveryId = 'app:terminal'
|
|
|
|
constructor (public session: Session) {
|
|
super()
|
|
}
|
|
|
|
getComponentType (): ComponentType<TerminalTab> {
|
|
return TerminalTabComponent
|
|
}
|
|
|
|
getRecoveryToken (): any {
|
|
return {
|
|
type: 'app:terminal',
|
|
recoveryId: this.session.recoveryId,
|
|
}
|
|
}
|
|
|
|
destroy (): void {
|
|
this.session.gracefullyDestroy()
|
|
}
|
|
}
|