1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 19:53:43 +00:00

[CL-106] use CL's DialogService in Desktop & Browser (#5875)

* remove libs/angular dialog service; move simple dialog types to CL

* update DialogServiceAbstraction imports to CL

* update imports in libs/angular to use CL

* colocate simple dialog types

* move SimpleConfigurableDialog files under SimpleDialog

* remove CL import alias from CL src

* update imports

* run prettier

* convert SimpleDialog enums to types

* replace DialogServiceAbstraction with DialogService

* restrict libs/angular imports in CL

* add deprecation note to ModalService

* Delete BrowserDialogService

* Remove ElectronDialogService

* update browser and desktop services.module

* remove os.EOL in simple dialog

* change SimpleDialogCloseType to boolean

* remove close type
This commit is contained in:
Will Martin
2023-08-16 08:26:56 -04:00
committed by GitHub
parent c304b59c3b
commit a4fcd62c99
147 changed files with 448 additions and 758 deletions

View File

@@ -3,7 +3,6 @@ import { FormBuilder } from "@angular/forms";
import { Observable, Subject } from "rxjs";
import { concatMap, debounceTime, filter, map, takeUntil, tap } from "rxjs/operators";
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction";
import { SettingsService } from "@bitwarden/common/abstractions/settings.service";
@@ -17,6 +16,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { DialogService } from "@bitwarden/components";
import { flagEnabled } from "../../platform/flags";
import { ElectronStateService } from "../../platform/services/electron-state.service.abstraction";
@@ -111,7 +111,7 @@ export class SettingsComponent implements OnInit {
private modalService: ModalService,
private themingService: AbstractThemingService,
private settingsService: SettingsService,
private dialogService: DialogServiceAbstraction
private dialogService: DialogService
) {
const isMac = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop;
@@ -300,7 +300,7 @@ export class SettingsComponent implements OnInit {
const confirmed = await this.dialogService.openSimpleDialog({
title: { key: "warning" },
content: { key: "neverLockWarning" },
type: SimpleDialogType.WARNING,
type: "warning",
});
if (!confirmed) {
@@ -336,7 +336,7 @@ export class SettingsComponent implements OnInit {
const confirmed = await this.dialogService.openSimpleDialog({
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
content: { key: "vaultTimeoutLogOutConfirmation" },
type: SimpleDialogType.WARNING,
type: "warning",
});
if (!confirmed) {
@@ -465,7 +465,7 @@ export class SettingsComponent implements OnInit {
const confirm = await this.dialogService.openSimpleDialog({
title: { key: "confirmTrayTitle" },
content: { key: "confirmTrayDesc" },
type: SimpleDialogType.WARNING,
type: "warning",
});
if (confirm) {
@@ -527,7 +527,7 @@ export class SettingsComponent implements OnInit {
content: { key: "browserIntegrationMasOnlyDesc" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
this.form.controls.enableBrowserIntegration.setValue(false);
@@ -538,7 +538,7 @@ export class SettingsComponent implements OnInit {
content: { key: "browserIntegrationWindowsStoreDesc" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
this.form.controls.enableBrowserIntegration.setValue(false);
@@ -549,7 +549,7 @@ export class SettingsComponent implements OnInit {
content: { key: "browserIntegrationLinuxDesc" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
this.form.controls.enableBrowserIntegration.setValue(false);