From cb431a95ffd1fba35a2b843d9cfb97f94465b88b Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 27 Sep 2022 17:57:36 -0700 Subject: [PATCH] print error messages during login/signup. --- frontend/src/app/app.component.ts | 14 +++++++------- .../auth-signin/auth-signin.component.html | 3 +++ .../pages/auth-signin/auth-signin.component.ts | 4 +++- .../auth-signup/auth-signup.component.html | 4 ++++ .../pages/auth-signup/auth-signup.component.ts | 6 +++++- frontend/src/app/services/fasten-api.service.ts | 17 +++++++++++++---- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index af5d173c..8bd2ebcb 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -22,18 +22,18 @@ export class AppComponent implements OnInit { navbarBackdrop.classList.add('az-navbar-backdrop'); document.querySelector('body').appendChild(navbarBackdrop); - //TODO: onfirst load the header is always shown, why? - // seems to be related to the presence of jwt token, and/or auth-interceptor. //determine if we should show the header this.router.events.subscribe(event => this.modifyHeader(event)); } modifyHeader(event) { - if(event instanceof NavigationEnd && event.url?.startsWith('/auth')) - { - this.showHeader = false; - } else { - this.showHeader = true; + if (event instanceof NavigationEnd) { + if (event.url?.startsWith('/auth')) { + this.showHeader = false; + } else { + // console.log("NU") + this.showHeader = true; + } } } } diff --git a/frontend/src/app/pages/auth-signin/auth-signin.component.html b/frontend/src/app/pages/auth-signin/auth-signin.component.html index 16ad98db..7d2f02de 100644 --- a/frontend/src/app/pages/auth-signin/auth-signin.component.html +++ b/frontend/src/app/pages/auth-signin/auth-signin.component.html @@ -37,6 +37,9 @@ + + +