option to auto-start a terminal tab (fixes #107)

This commit is contained in:
Eugene Pankov
2017-10-07 17:47:04 +02:00
parent fb64ca08d3
commit 38cda117e2
5 changed files with 46 additions and 4 deletions

View File

@@ -150,6 +150,8 @@ export class AppRootComponent {
if (this.app.tabs.length === 0) {
this.app.openDefaultTab()
}
this.app.emitReady()
}
@HostListener('dragover')

View File

@@ -1,4 +1,4 @@
import { Subject } from 'rxjs'
import { Subject, AsyncSubject } from 'rxjs'
import { Injectable, ComponentFactoryResolver, Injector, Optional } from '@angular/core'
import { DefaultTabProvider } from '../api/defaultTabProvider'
import { BaseTabComponent } from '../components/baseTab.component'
@@ -12,7 +12,8 @@ export class AppService {
activeTab: BaseTabComponent
lastTabIndex = 0
logger: Logger
tabsChanged$ = new Subject()
tabsChanged$ = new Subject<void>()
ready$ = new AsyncSubject<void>()
constructor (
private componentFactoryResolver: ComponentFactoryResolver,
@@ -97,4 +98,9 @@ export class AppService {
}
this.tabsChanged$.next()
}
emitReady () {
this.ready$.next(null)
this.ready$.complete()
}
}