1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +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

@@ -1,7 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { SubscriptionResponse } from "@bitwarden/common/billing/models/response/subscription.response";
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
@@ -10,6 +9,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { DialogService } from "@bitwarden/components";
@Component({
selector: "app-user-subscription",
@@ -36,7 +36,7 @@ export class UserSubscriptionComponent implements OnInit {
private router: Router,
private logService: LogService,
private fileDownloadService: FileDownloadService,
private dialogService: DialogServiceAbstraction,
private dialogService: DialogService,
private environmentService: EnvironmentService
) {
this.selfHosted = platformUtilsService.isSelfHost();
@@ -75,7 +75,7 @@ export class UserSubscriptionComponent implements OnInit {
content: { key: "manageSubscriptionFromStore" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
return;
@@ -84,7 +84,7 @@ export class UserSubscriptionComponent implements OnInit {
const confirmed = await this.dialogService.openSimpleDialog({
title: { key: "reinstateSubscription" },
content: { key: "reinstateConfirmation" },
type: SimpleDialogType.WARNING,
type: "warning",
});
if (!confirmed) {
@@ -112,7 +112,7 @@ export class UserSubscriptionComponent implements OnInit {
content: { key: "manageSubscriptionFromStore" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
return;
@@ -121,7 +121,7 @@ export class UserSubscriptionComponent implements OnInit {
const confirmed = await this.dialogService.openSimpleDialog({
title: { key: "cancelSubscription" },
content: { key: "cancelConfirmation" },
type: SimpleDialogType.WARNING,
type: "warning",
});
if (!confirmed) {
@@ -175,7 +175,7 @@ export class UserSubscriptionComponent implements OnInit {
content: { key: "cannotPerformInAppPurchase" },
acceptButtonText: { key: "ok" },
cancelButtonText: null,
type: SimpleDialogType.WARNING,
type: "warning",
});
return;