Browse Source

Improve TWA onboarding

Redirect to the account registration page
pull/173/head
Thomas 4 years ago
parent
commit
6c5c6dd1e8
  1. 5
      apps/client/src/app/core/auth.guard.ts
  2. 2
      apps/client/src/app/pages/register/register-page.html
  3. 2
      apps/client/src/app/pages/webauthn/webauthn-page.html

5
apps/client/src/app/core/auth.guard.ts

@ -40,7 +40,10 @@ export class AuthGuard implements CanActivate {
.get()
.pipe(
catchError(() => {
if (AuthGuard.PUBLIC_PAGE_ROUTES.includes(state.url)) {
if (route.queryParams?.utm_source) {
this.router.navigate(['/register']);
resolve(false);
} else if (AuthGuard.PUBLIC_PAGE_ROUTES.includes(state.url)) {
resolve(true);
return EMPTY;
} else if (state.url !== '/start') {

2
apps/client/src/app/pages/register/register-page.html

@ -2,7 +2,7 @@
<div class="row">
<div class="col">
<h3 class="d-flex justify-content-center mb-3 text-center" i18n>
Create your Ghostfolio account
Create your Account
</h3>
<mat-card class="mb-4">
<mat-card-content class="text-center">

2
apps/client/src/app/pages/webauthn/webauthn-page.html

@ -1,5 +1,6 @@
<div class="container">
<div class="row">
<div class="col">
<div
class="align-items-center d-flex flex-column justify-content-center mb-4 w-100"
>
@ -32,3 +33,4 @@
</div>
</div>
</div>
</div>

Loading…
Cancel
Save