From 3f8a8d6b4a3de868dc4190a5c243304fb6ebef3a Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 18 Dec 2019 13:40:35 +0100 Subject: [PATCH] #63, email gets trimmed now --- src/app/components/login/login.component.ts | 2 +- .../main-navigation.component.html | 27 ++++++++++++------- .../main-navigation.component.sass | 4 ++- .../main-navigation.component.ts | 2 -- .../components/register/register.component.ts | 4 +-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index 054f02f..d0c4e5d 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -34,7 +34,7 @@ export class LoginComponent implements OnInit { console.log('try to login with mail adress:' + pEmail); this.errorOccurred = false; this.errorMessage = " "; - this.login.email = pEmail + this.login.email = pEmail.trim() this.login.passwordHash = sha512.sha512(pPasswordHash); console.log(this.login.passwordHash); diff --git a/src/app/components/main-navigation/main-navigation.component.html b/src/app/components/main-navigation/main-navigation.component.html index e20ff90..4a94b6d 100644 --- a/src/app/components/main-navigation/main-navigation.component.html +++ b/src/app/components/main-navigation/main-navigation.component.html @@ -32,7 +32,7 @@ Greenvironment +
+ +
diff --git a/src/app/components/main-navigation/main-navigation.component.sass b/src/app/components/main-navigation/main-navigation.component.sass index 3e4e0eb..a4be210 100644 --- a/src/app/components/main-navigation/main-navigation.component.sass +++ b/src/app/components/main-navigation/main-navigation.component.sass @@ -26,6 +26,7 @@ .mat-tab-link height: 56px + #link-box padding: 0.5em @@ -36,7 +37,8 @@ /deep/ .mat-tab-link min-width: 5em!important - +#login-button + #menu-button-box text-align: right diff --git a/src/app/components/main-navigation/main-navigation.component.ts b/src/app/components/main-navigation/main-navigation.component.ts index 43dc4d3..a001d54 100644 --- a/src/app/components/main-navigation/main-navigation.component.ts +++ b/src/app/components/main-navigation/main-navigation.component.ts @@ -59,8 +59,6 @@ export class MainNavigationComponent implements OnInit { { path: '', label: 'Home' }, { path: '/about', label: 'About' }, { path: '/imprint', label: 'Imprint' }, - { path: '/login', label: 'Login' }, - { path: '/register', label: 'Register' }, ]; toggleTheme() { diff --git a/src/app/components/register/register.component.ts b/src/app/components/register/register.component.ts index e34a505..efdb425 100644 --- a/src/app/components/register/register.component.ts +++ b/src/app/components/register/register.component.ts @@ -32,8 +32,8 @@ export class RegisterComponent implements OnInit { this.errorOccurred = false; this.errorMessage = " "; if(this.passwordSame(pPasswordHash,pPasswordHashRepeat)){ - this.registration.username = pUsername - this.registration.email = pEmail + this.registration.username = pUsername.trim() + this.registration.email = pEmail.trim() this.registration.passwordHash = sha512.sha512(pPasswordHash); this.registerService.register(this.registration, error => this.registerError(error.json())); }