/
githubmirror
/
tabby
Обзор
Документация
Войти
/
githubmirror
/
tabby
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tabby-web-demo/src/components/terminalTab.component.ts
46 строк
1 KB
Eugene Pankov
separate color schemes per profile - fixes #5885, fixes #4593, fixes #3516, fixes #7457, fixes #765
04 фев 2023, 21:51
Не верифицирован
04 фев 2023, 21:51
69d884e
Код
Авторство
О чём код?
import { Component, Injector } from '@angular/core' import { BaseTerminalProfile, BaseTerminalTabComponent } from 'tabby-terminal' import { Session } from '../session' // eslint-disable-next-line @typescript-eslint/no-type-alias type DemoProfile = BaseTerminalProfile /** @hidden */ @Component({ selector: 'demoTerminalTab', template: BaseTerminalTabComponent.template, styles: BaseTerminalTabComponent.styles, animations: BaseTerminalTabComponent.animations, }) export class DemoTerminalTabComponent extends BaseTerminalTabComponent<DemoProfile> { session: Session|null = null // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor ( injector: Injector, ) { super(injector) } ngOnInit (): void { this.logger = this.log.create('terminalTab') this.session = new Session(this.injector, this.logger) super.ngOnInit() } protected onFrontendReady (): void { this.initializeSession() super.onFrontendReady() } initializeSession (): void { this.session!.start() this.attachSessionHandlers(true) this.recoveryStateChangedHint.next() } ngOnDestroy (): void { super.ngOnDestroy() this.session?.destroy() } }