mirror of
https://github.com/bitwarden/browser
synced 2026-03-01 11:01:17 +00:00
Tools/pm 29918/implement send auth flows (#18270)
* [PM-29918] Implement new Send auth flows * [PM-29918] Fix types * Trigger Claude code review * [PM-29918] Address PR review comments * [PM-29918] Remove duplicate AuthType const
This commit is contained in:
@@ -1,14 +1,38 @@
|
||||
<form (ngSubmit)="onSubmit(password)">
|
||||
<div class="tw-text-main tw-text-center" *ngIf="unavailable">
|
||||
<p bitTypography="body1">{{ "sendAccessUnavailable" | i18n }}</p>
|
||||
@if (loading()) {
|
||||
<div class="tw-text-center">
|
||||
<i
|
||||
class="bwi bwi-spinner bwi-spin bwi-2x tw-text-muted"
|
||||
title="{{ 'loading' | i18n }}"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
<div class="tw-text-main tw-text-center" *ngIf="error">
|
||||
<p bitTypography="body1">{{ "unexpectedErrorSend" | i18n }}</p>
|
||||
</div>
|
||||
|
||||
<app-send-access-password
|
||||
*ngIf="!unavailable"
|
||||
(setPasswordEvent)="password = $event"
|
||||
[loading]="loading"
|
||||
></app-send-access-password>
|
||||
}
|
||||
<form [formGroup]="sendAccessForm" (ngSubmit)="onSubmit()">
|
||||
@if (error()) {
|
||||
<div class="tw-text-main tw-text-center">
|
||||
<p bitTypography="body1">{{ "unexpectedErrorSend" | i18n }}</p>
|
||||
</div>
|
||||
}
|
||||
@if (unavailable()) {
|
||||
<div class="tw-text-main tw-text-center">
|
||||
<p bitTypography="body1">{{ "sendAccessUnavailable" | i18n }}</p>
|
||||
</div>
|
||||
} @else {
|
||||
@switch (sendAuthType()) {
|
||||
@case (authType.Password) {
|
||||
<app-send-access-password
|
||||
[loading]="loading()"
|
||||
[formGroup]="sendAccessForm"
|
||||
></app-send-access-password>
|
||||
}
|
||||
@case (authType.Email) {
|
||||
<app-send-access-email
|
||||
[formGroup]="sendAccessForm"
|
||||
[enterOtp]="enterOtp()"
|
||||
[loading]="loading()"
|
||||
></app-send-access-email>
|
||||
}
|
||||
}
|
||||
}
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user