mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-15 01:11:47 +01:00
handle registerRoute$ in secondary content
This commit is contained in:
parent
c89eb92a63
commit
677829f03a
@ -1,16 +1,30 @@
|
|||||||
import { Component } from "@angular/core";
|
import { CommonModule } from "@angular/common";
|
||||||
|
import { Component, inject } from "@angular/core";
|
||||||
import { RouterModule } from "@angular/router";
|
import { RouterModule } from "@angular/router";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
|
import { RegisterRouteService } from "@bitwarden/auth/common";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [JslibModule, RouterModule],
|
imports: [CommonModule, JslibModule, RouterModule],
|
||||||
template: `
|
template: `
|
||||||
<div class="tw-text-center">
|
<div class="tw-text-center">
|
||||||
{{ "newToBitwarden" | i18n }}
|
{{ "newToBitwarden" | i18n }}
|
||||||
<a class="tw-font-bold" bitLink routerLink="/register">{{ "createAccount" | i18n }}</a>
|
<a class="tw-font-bold" bitLink [routerLink]="registerRoute$ | async">{{
|
||||||
|
"createAccount" | i18n
|
||||||
|
}}</a>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class LoginSecondaryContentComponent {}
|
export class LoginSecondaryContentComponent {
|
||||||
|
registerRouteService = inject(RegisterRouteService);
|
||||||
|
|
||||||
|
// TODO: remove when email verification flag is removed
|
||||||
|
protected registerRoute$ = this.registerRouteService.registerRoute$();
|
||||||
|
|
||||||
|
// TODO-rr-bw: In the original login implementation, the "Create account" link
|
||||||
|
// also passes the email address to the registration page. We need to find a way to
|
||||||
|
// do this now that the "Create account" link is in a separate component as
|
||||||
|
// secondary content.
|
||||||
|
}
|
||||||
|
@ -74,25 +74,6 @@
|
|||||||
<span><i class="bwi bwi-passkey"></i> {{ "logInWithPasskey" | i18n }}</span>
|
<span><i class="bwi bwi-passkey"></i> {{ "logInWithPasskey" | i18n }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- TODO-rr-bw: according to Figma, move this to AnonLayout secondary content -->
|
|
||||||
<!-- Link to Create Account page -->
|
|
||||||
<!-- <p class="tw-m-0 tw-text-sm">
|
|
||||||
{{ "newAroundHere" | i18n }} -->
|
|
||||||
<!-- Two notes:
|
|
||||||
(1) We check the value and validity of email so we don't send an invalid email to autofill
|
|
||||||
on load of register for both enter and mouse based navigation
|
|
||||||
(2) We use mousedown to trigger navigation so that the onBlur form validation does not fire
|
|
||||||
and move the create account link down the page on click which causes the user to miss actually
|
|
||||||
clicking on the link. Mousedown fires before onBlur.
|
|
||||||
-->
|
|
||||||
<!-- <a
|
|
||||||
[routerLink]="registerRoute$ | async"
|
|
||||||
[queryParams]="emailFormControl.valid ? { email: emailFormControl.value } : {}"
|
|
||||||
(mousedown)="goToRegister()"
|
|
||||||
>{{ "createAccount" | i18n }}</a
|
|
||||||
>
|
|
||||||
</p> -->
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Loading…
Reference in New Issue
Block a user