Thomas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
apps/client/src/app/core/auth.guard.ts
|
@ -63,6 +63,7 @@ export class AuthGuard implements CanActivate { |
|
|
) { |
|
|
) { |
|
|
this.router.navigate(['/zen']); |
|
|
this.router.navigate(['/zen']); |
|
|
resolve(false); |
|
|
resolve(false); |
|
|
|
|
|
return; |
|
|
} else if (state.url.startsWith('/start')) { |
|
|
} else if (state.url.startsWith('/start')) { |
|
|
if (user.settings.viewMode === ViewMode.ZEN) { |
|
|
if (user.settings.viewMode === ViewMode.ZEN) { |
|
|
this.router.navigate(['/zen']); |
|
|
this.router.navigate(['/zen']); |
|
@ -71,12 +72,14 @@ export class AuthGuard implements CanActivate { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
resolve(false); |
|
|
resolve(false); |
|
|
|
|
|
return; |
|
|
} else if ( |
|
|
} else if ( |
|
|
state.url.startsWith('/zen') && |
|
|
state.url.startsWith('/zen') && |
|
|
user.settings.viewMode === ViewMode.DEFAULT |
|
|
user.settings.viewMode === ViewMode.DEFAULT |
|
|
) { |
|
|
) { |
|
|
this.router.navigate(['/home']); |
|
|
this.router.navigate(['/home']); |
|
|
resolve(false); |
|
|
resolve(false); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
resolve(true); |
|
|
resolve(true); |
|
|