Commit e684381d authored by Melvin Luong's avatar Melvin Luong
Browse files

Updated header/banner profile icon to include the user's username if user has logged in.

parent 514748e6
......@@ -26,4 +26,7 @@
color: #f0f0f0;
font-size: smaller;
}
\ No newline at end of file
.profile-button {
padding: 30px 0px 0px 0px;
}
\ No newline at end of file
......@@ -15,10 +15,10 @@
<span class="banner">STRUDEL</span>
<span fxFlex></span>
<span class="fill-horizontal-space"></span>
<button mat-icon-button [matMenuTriggerFor]="actionmenu">
<mat-icon>person</mat-icon>
<button mat-button [matMenuTriggerFor]="actionmenu" disableRipple="true" class="profile-button">
{{ displayUsername() }}
<mat-icon>expand_more</mat-icon>
</button>
<mat-menu #actionmenu="matMenu">
<div *ngFor="let az of (authService.loggedInAuthZ | async)">
<button mat-menu-item routerLink="/logout"><mat-icon>logout</mat-icon>Log out of {{ az.name }}</button>
......
......@@ -107,6 +107,14 @@ export class AppComponent {
return count;
}
displayUsername() {
let ids = this.computeSitesService.appidentities.value;
if (Array.isArray(ids) && ids.length) {
return ids[0].username;
}
}
// login() {
// console.log("login");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment