From c40c3436cdb8562394e5648e4ed123c70f10d37e Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Fri, 10 Nov 2017 17:53:53 +0200 Subject: [PATCH] fixing the navigation --- dmp-frontend/src/app/app.component.html | 8 ++++---- dmp-frontend/src/app/app.component.ts | 2 +- .../login/googgle-sign-in/googgle-sign-in.component.ts | 1 - .../src/app/user-workspace/user-workspace.component.ts | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html index 6754b9481..8aefeb25f 100644 --- a/dmp-frontend/src/app/app.component.html +++ b/dmp-frontend/src/app/app.component.html @@ -56,10 +56,10 @@ -->
- - - - + + + + diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index d1120bfbd..b89a622f0 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -50,7 +50,7 @@ export class AppComponent implements OnInit { login(){ console.log("navigating to login") //redirect to login page - this.router.navigate(['/login'], { queryParams: { refresh : Math.random() /*,returnUrl: this.state.url*/ }}); + this.router.navigate(['/login'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }}); location.reload(); } diff --git a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts index 5914af6b2..c027a3e6f 100644 --- a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts +++ b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts @@ -75,7 +75,6 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit, Injectable //simple_notifier("success",null,"Successful login"); let profile = googleUser.getBasicProfile(); this.tokenService.login(googleUser.getAuthResponse().id_token, TokenProvider.google, profile.getName(), profile.getEmail()); - this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }}); }, function (error) { //simple_notifier("danger",null,"Failed to login"); diff --git a/dmp-frontend/src/app/user-workspace/user-workspace.component.ts b/dmp-frontend/src/app/user-workspace/user-workspace.component.ts index 88f47fa75..ca856f3fc 100644 --- a/dmp-frontend/src/app/user-workspace/user-workspace.component.ts +++ b/dmp-frontend/src/app/user-workspace/user-workspace.component.ts @@ -18,8 +18,8 @@ export class UserWorkspaceComponent implements OnInit { ngOnInit() { - if(!this.tokenService.isLoggedIn()) - this.router.navigate([''], { queryParams: { /*returnUrl: this.state.url*/ }}); + //if(!this.tokenService.isLoggedIn()) + //this.router.navigate([''], { queryParams: { /*returnUrl: this.state.url*/ }}); }