|
@ -7,6 +7,7 @@ import { |
|
|
Output |
|
|
Output |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; |
|
|
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; |
|
|
|
|
|
import { MatMenuTrigger } from '@angular/material/menu'; |
|
|
import { Router } from '@angular/router'; |
|
|
import { Router } from '@angular/router'; |
|
|
import { LoginWithAccessTokenDialog } from '@ghostfolio/client/components/login-with-access-token-dialog/login-with-access-token-dialog.component'; |
|
|
import { LoginWithAccessTokenDialog } from '@ghostfolio/client/components/login-with-access-token-dialog/login-with-access-token-dialog.component'; |
|
|
import { DataService } from '@ghostfolio/client/services/data.service'; |
|
|
import { DataService } from '@ghostfolio/client/services/data.service'; |
|
@ -29,6 +30,8 @@ import { catchError, takeUntil } from 'rxjs/operators'; |
|
|
}) |
|
|
}) |
|
|
export class HeaderComponent implements OnChanges { |
|
|
export class HeaderComponent implements OnChanges { |
|
|
@Input() currentRoute: string; |
|
|
@Input() currentRoute: string; |
|
|
|
|
|
@Input() currentSubRoute: string; |
|
|
|
|
|
@Input() deviceType: string; |
|
|
@Input() info: InfoItem; |
|
|
@Input() info: InfoItem; |
|
|
@Input() pageTitle: string; |
|
|
@Input() pageTitle: string; |
|
|
@Input() user: User; |
|
|
@Input() user: User; |
|
@ -88,6 +91,10 @@ export class HeaderComponent implements OnChanges { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public closeMenu(menuTrigger: MatMenuTrigger) { |
|
|
|
|
|
menuTrigger.closeMenu(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public impersonateAccount(aId: string) { |
|
|
public impersonateAccount(aId: string) { |
|
|
if (aId) { |
|
|
if (aId) { |
|
|
this.impersonationStorageService.setId(aId); |
|
|
this.impersonationStorageService.setId(aId); |
|
@ -143,6 +150,10 @@ export class HeaderComponent implements OnChanges { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public openMenu(menuTrigger: MatMenuTrigger) { |
|
|
|
|
|
menuTrigger.openMenu(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public setToken(aToken: string) { |
|
|
public setToken(aToken: string) { |
|
|
this.tokenStorageService.saveToken( |
|
|
this.tokenStorageService.saveToken( |
|
|
aToken, |
|
|
aToken, |
|
|