1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

[SG-656] Fix Trial Initiation Captcha Issue (#3481)

* [refactor] Isolate form validation logic

* [refactor] Relocate a few input scrubbing lines

* [refactor] Isolate RegisterRequest object construction logic

* [refactor] Isolate account registration logic

* [refactor] Isolate login logic

* [fix] Check for captchas during login from trial initiation

* [fix] Avoid a duplicated toast if the account was already created
This commit is contained in:
Addison Beck
2022-09-09 14:56:36 -04:00
committed by GitHub
parent d4581b0ba3
commit 65641a38b7
2 changed files with 145 additions and 98 deletions

View File

@@ -113,16 +113,21 @@
</div>
<div class="tw-mb-3 tw-flex">
<bit-submit-button [loading]="form.loading">{{ "createAccount" | i18n }}</bit-submit-button>
<a
bitButton
buttonType="secondary"
routerLink="/login"
class="tw-ml-3 tw-inline-flex tw-items-center tw-px-3"
>
<i class="bwi bwi-sign-in tw-mr-2"></i>
{{ "logIn" | i18n }}
</a>
<ng-container *ngIf="!accountCreated">
<bit-submit-button [loading]="form.loading">{{ "createAccount" | i18n }}</bit-submit-button>
<a
bitButton
buttonType="secondary"
routerLink="/login"
class="tw-ml-3 tw-inline-flex tw-items-center tw-px-3"
>
<i class="bwi bwi-sign-in tw-mr-2"></i>
{{ "logIn" | i18n }}
</a>
</ng-container>
<ng-container *ngIf="accountCreated">
<bit-submit-button [loading]="form.loading">{{ "logIn" | i18n }}</bit-submit-button>
</ng-container>
</div>
<bit-error-summary *ngIf="showErrorSummary" [formGroup]="formGroup"></bit-error-summary>
</div>