report progress from the console commands in tab headers and taskbar

This commit is contained in:
Eugene Pankov
2018-08-25 00:22:43 +02:00
parent c9dde2e29c
commit 64f670bd86
7 changed files with 44 additions and 1 deletions

View File

@@ -138,7 +138,16 @@ export class AppRootComponent {
config.changed$.subscribe(() => this.updateVibrancy())
this.updateVibrancy()
this.app.tabOpened$.subscribe(tab => this.unsortedTabs.push(tab))
this.app.tabOpened$.subscribe(tab => {
this.unsortedTabs.push(tab)
tab.progress$.subscribe(progress => {
if (progress !== null) {
this.hostApp.getWindow().setProgressBar(progress / 100.0, 'normal')
} else {
this.hostApp.getWindow().setProgressBar(0, 'none')
}
})
})
this.app.tabClosed$.subscribe(tab => {
this.unsortedTabs = this.unsortedTabs.filter(x => x !== tab)
})