Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 4x 4x 4x 5x 5x 5x 5x 15x 15x | import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { AccountFacade } from 'ish-core/facades/account.facade';
import { User } from 'ish-core/models/user/user.model';
@Component({
selector: 'ish-login-status',
templateUrl: './login-status.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class LoginStatusComponent implements OnInit {
@Input() logoutOnly = false;
@Input() view: 'auto' | 'small' | 'full' = 'auto';
user$: Observable<User>;
constructor(private accountFacade: AccountFacade) {}
ngOnInit() {
this.user$ = this.accountFacade.user$;
}
getViewClasses(): string {
switch (this.view) {
case 'auto':
return 'd-none d-lg-inline';
case 'full':
return 'd-inline';
case 'small':
return 'd-none';
}
}
}
|