Replace app-callout with bit-callout and fixed the used types forthe styles (#8414)

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith 2024-03-20 23:39:25 +01:00 committed by GitHub
parent c6327d7f12
commit e2fe1e1567
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View File

@ -18,12 +18,12 @@
{{ dialogOptions.bodyText | i18n }} {{ dialogOptions.bodyText | i18n }}
</p> </p>
<app-callout <bit-callout
*ngIf="dialogOptions.calloutOptions" *ngIf="dialogOptions.calloutOptions"
[type]="dialogOptions.calloutOptions.type" [type]="dialogOptions.calloutOptions.type"
> >
{{ dialogOptions.calloutOptions.text | i18n }} {{ dialogOptions.calloutOptions.text | i18n }}
</app-callout> </bit-callout>
</ng-container> </ng-container>
<!-- Shown when client side verification methods picked and no verification methods found --> <!-- Shown when client side verification methods picked and no verification methods found -->

View File

@ -12,6 +12,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
import { import {
AsyncActionsModule, AsyncActionsModule,
ButtonModule, ButtonModule,
CalloutModule,
DialogModule, DialogModule,
DialogService, DialogService,
} from "@bitwarden/components"; } from "@bitwarden/components";
@ -34,6 +35,7 @@ import { UserVerificationFormInputComponent } from "./user-verification-form-inp
DialogModule, DialogModule,
AsyncActionsModule, AsyncActionsModule,
UserVerificationFormInputComponent, UserVerificationFormInputComponent,
CalloutModule,
], ],
}) })
export class UserVerificationDialogComponent { export class UserVerificationDialogComponent {

View File

@ -11,9 +11,9 @@ export type UserVerificationCalloutOptions = {
/** /**
* The type of the callout. * The type of the callout.
* Can be "warning", "danger", "error", or "tip". * Can be "warning", "danger", "info", or "success".
*/ */
type: "warning" | "danger" | "error" | "tip"; type: "warning" | "danger" | "info" | "success";
}; };
/** /**

View File

@ -49,12 +49,12 @@
</div> </div>
</div> </div>
<app-callout type="error" *ngIf="biometricsVerificationFailed"> <bit-callout type="danger" *ngIf="biometricsVerificationFailed">
{{ "couldNotCompleteBiometrics" | i18n }} {{ "couldNotCompleteBiometrics" | i18n }}
<button bitLink type="button" linkType="primary" (click)="verifyUserViaBiometrics()"> <button bitLink type="button" linkType="primary" (click)="verifyUserViaBiometrics()">
{{ "tryAgain" | i18n }} {{ "tryAgain" | i18n }}
</button> </button>
</app-callout> </bit-callout>
</ng-container> </ng-container>
<!-- Alternate verification options if user has more than 1 --> <!-- Alternate verification options if user has more than 1 -->

View File

@ -20,6 +20,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
import { import {
AsyncActionsModule, AsyncActionsModule,
ButtonModule, ButtonModule,
CalloutModule,
FormFieldModule, FormFieldModule,
IconButtonModule, IconButtonModule,
IconModule, IconModule,
@ -62,6 +63,7 @@ import { ActiveClientVerificationOption } from "./active-client-verification-opt
IconModule, IconModule,
LinkModule, LinkModule,
ButtonModule, ButtonModule,
CalloutModule,
], ],
}) })
// eslint-disable-next-line rxjs-angular/prefer-takeuntil // eslint-disable-next-line rxjs-angular/prefer-takeuntil