ui fix on navbar
This commit is contained in:
parent
386aa5de05
commit
82b53314b9
|
@ -57,7 +57,7 @@
|
|||
<ul class="navbar-nav">
|
||||
<!-- Login -->
|
||||
<li class="nav-item" *ngIf="this.isAuthenticated();else loginoption">
|
||||
<img mat-card-avatar class="my-mat-card-avatar" [src]="getPrincipalAvatar() ?? getDefaultAvatar()" (error)="this.applyFallbackAvatar($event)" (click)="openProfile()" [matTooltip]="this.getPrincipalName()">
|
||||
<img mat-card-avatar class="my-mat-card-avatar" [src]="getPrincipalAvatar() ?? getDefaultAvatar()" (error)="this.applyFallbackAvatar($event)" (click)="openProfile()" [matTooltip]="userName">
|
||||
<!--<img mat-card-avatar class="my-mat-card-avatar" *ngIf="!this.principalHasAvatar()" [src]="this.getDefaultAvatar()" (click)="openProfile()"> -->
|
||||
</li>
|
||||
<ng-template #loginoption>
|
||||
|
|
|
@ -26,6 +26,7 @@ import { nameof } from 'ts-simple-nameof';
|
|||
import { StartNewDmpDialogComponent } from '../dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
||||
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
||||
import { UserDialogComponent } from './user-dialog/user-dialog.component';
|
||||
import { UserService } from '@app/core/services/user/user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navbar',
|
||||
|
@ -33,6 +34,7 @@ import { UserDialogComponent } from './user-dialog/user-dialog.component';
|
|||
styleUrls: ['./navbar.component.css', './navbar.component.scss']
|
||||
})
|
||||
export class NavbarComponent extends BaseComponent implements OnInit {
|
||||
userName: string = '';
|
||||
progressIndication = false;
|
||||
//private listTitles: any[];
|
||||
location: Location;
|
||||
|
@ -53,6 +55,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|||
private element: ElementRef,
|
||||
private router: Router,
|
||||
public authentication: AuthService,
|
||||
private userService: UserService,
|
||||
private dialog: MatDialog,
|
||||
private progressIndicationService: ProgressIndicationService,
|
||||
private languageService: LanguageService,
|
||||
|
@ -105,6 +108,11 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
this.loadLogo();
|
||||
|
||||
this.userService.getSingle(this.authentication.userId(), [
|
||||
nameof<User>(x => x.id),
|
||||
nameof<User>(x => x.name)
|
||||
]).subscribe(u => this.userName = u.name);
|
||||
}
|
||||
|
||||
private loadLogo() {
|
||||
|
|
Loading…
Reference in New Issue