added "hello, <username>"

master
Max 5 years ago
parent 8d753f957e
commit da092f9cef

@ -3,9 +3,11 @@
<mat-sidenav #drawer class="sidenav" <mat-sidenav #drawer class="sidenav"
fxShow="true" fxHide.gt-sm="true" fxShow="true" fxHide.gt-sm="true"
fixedInViewport="false" fixedInViewport="false"
autoFocus="false" autoFocus="false">
> <mat-toolbar *ngIf="!loggedIn">Menu</mat-toolbar>
<mat-toolbar>Menu</mat-toolbar> <mat-toolbar *ngIf="loggedIn">
<span>Hello, {{user.username}}</span>
</mat-toolbar>
<mat-nav-list> <mat-nav-list>
<a mat-list-item routerLink="" (click)="drawer.close()">Home</a> <a mat-list-item routerLink="" (click)="drawer.close()">Home</a>
<a mat-list-item *ngIf="loggedIn" routerLink={{profileUrl}} (click)="drawer.close()">Profile</a> <a mat-list-item *ngIf="loggedIn" routerLink={{profileUrl}} (click)="drawer.close()">Profile</a>
@ -56,6 +58,7 @@
</div> </div>
</nav> </nav>
<div id="menu-button-box"> <div id="menu-button-box">
<span class="mat-button" [hidden]="!loggedIn" fxShow="true" fxHide.lt-md="true" routerLink={{profileUrl}}>Hello, {{user.username}}</span>
<button mat-icon-button [matMenuTriggerFor]="requestMenu" [disabled]="!loggedIn" id="menu-button"> <button mat-icon-button [matMenuTriggerFor]="requestMenu" [disabled]="!loggedIn" id="menu-button">
<mat-icon [matBadge]="user.receivedRequests.length" [matBadgeHidden]="!(user.receivedRequests.length > 0)" matBadgeColor="accent">notifications</mat-icon> <mat-icon [matBadge]="user.receivedRequests.length" [matBadgeHidden]="!(user.receivedRequests.length > 0)" matBadgeColor="accent">notifications</mat-icon>
</button> </button>
@ -81,7 +84,7 @@
<mat-slide-toggle <mat-slide-toggle
color="primary" color="primary"
class="theme-button" class="theme-button"
(change)="toggleTheme()"><!--stays white when dragged--> (change)="toggleTheme()">
dark mode dark mode
</mat-slide-toggle> </mat-slide-toggle>
</button> </button>

@ -19,7 +19,7 @@
top: 0 top: 0
z-index: 1000 z-index: 1000
.mat-tab-nav-bar .mat-tab-nav-bar
width: 70% width: 50%
height: 56px height: 56px
.mat-tab-links .mat-tab-links
height: 56px height: 56px

@ -32,7 +32,7 @@ export class SelfService {
}, error => { }, error => {
this.notLoggedIn(); this.notLoggedIn();
console.log(error.text()); console.log(error.text());
// this.fakeLogin(); this.fakeLogin();
// console.log('user wurde übergeben'); // console.log('user wurde übergeben');
} }
); );

Loading…
Cancel
Save