nicer touch bar buttons

This commit is contained in:
Eugene Pankov
2018-08-25 10:11:32 +02:00
parent 06d14f9bb2
commit 7f45bb57fc
10 changed files with 29 additions and 21 deletions

View File

@@ -24,7 +24,7 @@ title-bar(
[index]='idx',
[tab]='tab',
[active]='tab == app.activeTab',
[hasActivity]='tab.hasActivity',
[hasActivity]='tab.activity$|async',
@animateTab,
(click)='app.selectTab(tab)',
[class.fully-draggable]='hostApp.platform != Platform.macOS',

View File

@@ -144,7 +144,7 @@ export class AppRootComponent {
if (progress !== null) {
this.hostApp.getWindow().setProgressBar(progress / 100.0, 'normal')
} else {
this.hostApp.getWindow().setProgressBar(0, 'none')
this.hostApp.getWindow().setProgressBar(-1, 'none')
}
})
})

View File

@@ -6,18 +6,20 @@ export abstract class BaseTabComponent {
id: number
title: string
customTitle: string
hasActivity = false
hasFocus = false
hasActivity = false
hostView: ViewRef
protected titleChange = new Subject<string>()
protected focused = new Subject<void>()
protected blurred = new Subject<void>()
protected progress = new Subject<number>()
protected activity = new Subject<boolean>()
get focused$ (): Observable<void> { return this.focused }
get blurred$ (): Observable<void> { return this.blurred }
get titleChange$ (): Observable<string> { return this.titleChange }
get progress$ (): Observable<number> { return this.progress }
get activity$ (): Observable<boolean> { return this.activity }
constructor () {
this.id = BaseTabComponent.lastTabID++
@@ -42,6 +44,12 @@ export abstract class BaseTabComponent {
displayActivity (): void {
this.hasActivity = true
this.activity.next(true)
}
clearActivity (): void {
this.hasActivity = false
this.activity.next(false)
}
getRecoveryToken (): any {