mirror of
https://github.com/bitwarden/browser
synced 2026-01-10 12:33:26 +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:
@@ -1,5 +1,6 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
||||
import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service";
|
||||
@@ -31,7 +32,8 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
||||
platformUtilsService: PlatformUtilsService,
|
||||
apiService: ApiService,
|
||||
logService: LogService,
|
||||
fileDownloadService: FileDownloadService
|
||||
fileDownloadService: FileDownloadService,
|
||||
dialogService: DialogServiceAbstraction
|
||||
) {
|
||||
super(
|
||||
cipherService,
|
||||
@@ -41,7 +43,8 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
||||
platformUtilsService,
|
||||
apiService,
|
||||
logService,
|
||||
fileDownloadService
|
||||
fileDownloadService,
|
||||
dialogService
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user