mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[PM-3763] remove Sweet Alert from desktop and browser (#6138)
* update desktop and browser swal references to use CL * rename bit-dialog-close * share fingerprint dialog between desktop and browser * apply code review * format fingerprint in template * apply code review * fix button color * fix button types * update var names * close awaitDesktop dialog on success AND error * add DialogService to NativeMessageHandlerService deps * wrap browser message dialogs in ngZone.run * wrap native messaging handler in ngzone.run * apply code review * fix async ngzone --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import { firstValueFrom, Subject, takeUntil } from "rxjs";
|
||||
|
||||
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||
import { FingerprintDialogComponent } from "@bitwarden/auth";
|
||||
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
|
||||
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
|
||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||
@@ -244,18 +245,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
const fingerprint = await this.cryptoService.getFingerprint(
|
||||
await this.stateService.getUserId()
|
||||
);
|
||||
const result = await this.dialogService.openSimpleDialog({
|
||||
title: { key: "fingerprintPhrase" },
|
||||
content:
|
||||
this.i18nService.t("yourAccountsFingerprint") + ":\n" + fingerprint.join("-"),
|
||||
acceptButtonText: { key: "learnMore" },
|
||||
cancelButtonText: { key: "close" },
|
||||
type: "info",
|
||||
});
|
||||
|
||||
if (result) {
|
||||
this.platformUtilsService.launchUri("https://bitwarden.com/help/fingerprint-phrase/");
|
||||
}
|
||||
const dialogRef = FingerprintDialogComponent.open(this.dialogService, { fingerprint });
|
||||
await firstValueFrom(dialogRef.closed);
|
||||
break;
|
||||
}
|
||||
case "deleteAccount":
|
||||
|
||||
Reference in New Issue
Block a user