From 684d784d1ac1534996a325652bea43ca36dccb2b Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Tue, 6 Jul 2021 09:46:27 +0300 Subject: [PATCH] Routing updates. * Start new dmp Button navigates you to home. * Login page redirects you to home page if user is already logged in. --- dmp-frontend/src/app/ui/auth/login/login.component.ts | 5 ++++- dmp-frontend/src/assets/splash/index.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/auth/login/login.component.ts b/dmp-frontend/src/app/ui/auth/login/login.component.ts index 4050b12c0..c001dac0c 100644 --- a/dmp-frontend/src/app/ui/auth/login/login.component.ts +++ b/dmp-frontend/src/app/ui/auth/login/login.component.ts @@ -54,10 +54,13 @@ export class LoginComponent extends BaseComponent implements OnInit, AfterViewIn private mergeLoginService: MergeLoginService, private oauth2DialogService: Oauth2DialogService, private httpClient: HttpClient, - private matomoService: MatomoService + private matomoService: MatomoService, ) { super(); } ngOnInit(): void { + if(this.authService.current()){ + this.router.navigate(['home']); + } this.matomoService.trackPageView('loginPage'); this.route.queryParams .pipe(takeUntil(this._destroyed)) diff --git a/dmp-frontend/src/assets/splash/index.html b/dmp-frontend/src/assets/splash/index.html index b776ccdb4..8b6aa48be 100644 --- a/dmp-frontend/src/assets/splash/index.html +++ b/dmp-frontend/src/assets/splash/index.html @@ -85,7 +85,7 @@ analysed and stored.

- +