email is now always lower case

master
Max 5 years ago
parent cac9554d91
commit f2364c381a

@ -35,11 +35,10 @@ export class LoginComponent implements OnInit {
console.log('try to login with mail adress:' + pEmail); console.log('try to login with mail adress:' + pEmail);
this.errorOccurred = false; this.errorOccurred = false;
this.errorMessage = ' '; this.errorMessage = ' ';
this.login.email = pEmail.trim(); this.login.email = pEmail.trim().toLowerCase();
this.login.passwordHash = sha512.sha512(pPasswordHash); this.login.passwordHash = sha512.sha512(pPasswordHash);
console.log(this.login.passwordHash); console.log(this.login.email);
console.log(this.login.passwordHash);
this.loginService.login(this.login, error => this.loginError(error.json())); this.loginService.login(this.login, error => this.loginError(error.json()));
} }

@ -56,10 +56,24 @@
</div> </div>
</nav> </nav>
<div id="menu-button-box"> <div id="menu-button-box">
<button mat-icon-button [matMenuTriggerFor]="requestMenu" [disabled]="!loggedIn" id="menu-button">
<mat-icon >notifications</mat-icon>
</button>
<button mat-icon-button [matMenuTriggerFor]="menu" id="menu-button"> <button mat-icon-button [matMenuTriggerFor]="menu" id="menu-button">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>
</div> </div>
<mat-menu #requestMenu="matMenu">
<button mat-menu-item (click)="$event.stopPropagation();">
<button mat-icon-button>
<mat-icon>check</mat-icon>
</button>
<button mat-icon-button>
<mat-icon>close</mat-icon>
</button>
<span>request</span>
</button>
</mat-menu>
<mat-menu #menu="matMenu"> <mat-menu #menu="matMenu">
<button mat-menu-item (click)="$event.stopPropagation();"> <button mat-menu-item (click)="$event.stopPropagation();">
<mat-slide-toggle <mat-slide-toggle

@ -39,7 +39,6 @@
#login-button #login-button
#menu-button-box #menu-button-box
text-align: right text-align: right
width: 100% width: 100%

@ -33,7 +33,7 @@ export class RegisterComponent implements OnInit {
this.errorMessage = ' '; this.errorMessage = ' ';
if (this.passwordSame(pPasswordHash, pPasswordHashRepeat)) { if (this.passwordSame(pPasswordHash, pPasswordHashRepeat)) {
this.registration.username = pUsername.trim(); this.registration.username = pUsername.trim();
this.registration.email = pEmail.trim(); this.registration.email = pEmail.trim().toLowerCase();
this.registration.passwordHash = sha512.sha512(pPasswordHash); this.registration.passwordHash = sha512.sha512(pPasswordHash);
this.registerService.register(this.registration, error => this.registerError(error.json())); this.registerService.register(this.registration, error => this.registerError(error.json()));
} }

@ -3,7 +3,12 @@
<button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button> <button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button>
<button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button> <button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button>
</div>--> </div>-->
<mat-toolbar><span>Friends</span></mat-toolbar> <mat-toolbar>
<span>Friends</span>
<div id="button-box">
<button mat-icon-button><mat-icon>person_add</mat-icon></button>
</div>
</mat-toolbar>
<div id="friendlist"> <div id="friendlist">
<!--<div class="frienditem" *ngFor="let friend of friends" <!--<div class="frienditem" *ngFor="let friend of friends"
[class.selected]="friend === selectedFriend" (click)="showFriendProfile(friend)"> [class.selected]="friend === selectedFriend" (click)="showFriendProfile(friend)">

@ -17,3 +17,7 @@
.profile-picture .profile-picture
background-image: url(https://material.angular.io/assets/img/examples/shiba1.jpg) background-image: url(https://material.angular.io/assets/img/examples/shiba1.jpg)
background-size: cover background-size: cover
#button-box
text-align: right
width: 100%

@ -3,7 +3,12 @@
<button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button> <button id="new" type="submit"><span><i class="fa fa-plus fa-3x" aria-hidden="true"></i></span></button>
<button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button> <button id="invitations" type="submit"><span><i class="fa fa-envelope-o fa-3x" aria-hidden="true"></i></span></button>
</div>--> </div>-->
<mat-toolbar><span>Groups</span></mat-toolbar> <mat-toolbar>
<span>Groups</span>
<div id="button-box">
<button mat-icon-button><mat-icon>group_add</mat-icon></button>
</div>
</mat-toolbar>
<div id="grouplist"> <div id="grouplist">
<!--<div class="groupitem" *ngFor="let group of groups" <!--<div class="groupitem" *ngFor="let group of groups"
[class.selected]="group === selectedGroup" (click)="showGroup(group)"> [class.selected]="group === selectedGroup" (click)="showGroup(group)">

@ -15,3 +15,7 @@
.group-picture .group-picture
background-image: url(https://material.angular.io/assets/img/examples/shiba1.jpg) background-image: url(https://material.angular.io/assets/img/examples/shiba1.jpg)
background-size: cover background-size: cover
#button-box
text-align: right
width: 100%
Loading…
Cancel
Save