1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-31 15:43:28 +00:00

[PS-589] Added Device Verification section setting for 2FA Email for new device (#2868)

* PS-589 Added Device Verification section for enable/disable the feature of 2FA email on new device login and the api calls for the new endpoint

* PS-589 prettier fix

* PS-589 Fix import typo because of caps

* PS-589 Improved button to use bitButton directive and loading to have the ngIf on the 2fa setup component
This commit is contained in:
Federico Maccaroni
2022-06-13 15:13:22 -03:00
committed by GitHub
parent 2d72201650
commit c93c6a775d
8 changed files with 186 additions and 3 deletions

View File

@@ -55,6 +55,47 @@
</div>
</li>
</ul>
<form *ngIf="!loading" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
<div class="row">
<div class="col-12">
<h2 class="mt-5 spaced-header">
{{ "deviceVerification" | i18n }}
</h2>
<div class="form-group">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="enableDeviceVerification"
name="enableDeviceVerification"
disabled="{{ !isDeviceVerificationSectionEnabled }}"
[(ngModel)]="enableDeviceVerification"
/>
<label class="form-check-label" for="enableDeviceVerification">
{{ "enableDeviceVerification" | i18n }}
</label>
</div>
<small class="form-text text-muted">{{ "deviceVerificationDesc" | i18n }}</small>
</div>
<button
type="submit"
bitButton
buttonType="primary"
class="btn-submit"
[disabled]="form.loading"
*ngIf="isDeviceVerificationSectionEnabled"
>
<i
class="bwi bwi-spinner bwi-spin"
title="{{ 'loading' | i18n }}"
aria-hidden="true"
*ngIf="form.loading"
></i>
<span>{{ "save" | i18n }}</span>
</button>
</div>
</div>
</form>
<ng-template #authenticatorTemplate></ng-template>
<ng-template #recoveryTemplate></ng-template>