mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-1504] Migrate Dialogs to DialogService (#5013)
This PR introduces a generic `DialogService` which can be used by all the clients. This allows us to decouple dialogs from the `PlatformUtilsHelper`. The `DialogService` provides a new method, `openSimpleDialog` which is the new interface for that type of dialogs. This gives us 3 different implementations: - Web: DialogService modern dialogs - Browser: SweetAlert - Desktop: Native electron based
This commit is contained in:
@@ -119,9 +119,6 @@ export default class RuntimeBackground {
|
||||
BrowserApi.closeBitwardenExtensionTab();
|
||||
}, msg.delay ?? 0);
|
||||
break;
|
||||
case "showDialogResolve":
|
||||
this.platformUtilsService.resolveDialogPromise(msg.dialogId, msg.confirmed);
|
||||
break;
|
||||
case "bgCollectPageDetails":
|
||||
await this.main.collectPageDetailsForContentScript(sender.tab, msg.sender, sender.frameId);
|
||||
break;
|
||||
@@ -204,10 +201,10 @@ export default class RuntimeBackground {
|
||||
break;
|
||||
case "emailVerificationRequired":
|
||||
this.messagingService.send("showDialog", {
|
||||
dialogId: "emailVerificationRequired",
|
||||
title: this.i18nService.t("emailVerificationRequired"),
|
||||
text: this.i18nService.t("emailVerificationRequiredDesc"),
|
||||
confirmText: this.i18nService.t("ok"),
|
||||
title: { key: "emailVerificationRequired" },
|
||||
content: { key: "emailVerificationRequiredDesc" },
|
||||
acceptButtonText: { key: "ok" },
|
||||
cancelButtonText: null,
|
||||
type: "info",
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user