mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01: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:
parent
c304b59c3b
commit
a4fcd62c99
@ -156,7 +156,10 @@
|
|||||||
{
|
{
|
||||||
"files": ["libs/components/src/**/*.ts"],
|
"files": ["libs/components/src/**/*.ts"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-restricted-imports": ["error", { "patterns": ["@bitwarden/components/*", "src/**/*"] }]
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{ "patterns": ["@bitwarden/components/*", "src/**/*", "@bitwarden/angular/*"] }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@ import { Component, NgZone } from "@angular/core";
|
|||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||||
@ -19,6 +18,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors";
|
import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors";
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
policyService: InternalPolicyService,
|
policyService: InternalPolicyService,
|
||||||
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
router,
|
router,
|
||||||
|
@ -4,7 +4,6 @@ import { Router } from "@angular/router";
|
|||||||
|
|
||||||
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
||||||
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
@ -15,6 +14,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-register",
|
selector: "app-register",
|
||||||
@ -38,7 +38,7 @@ export class RegisterComponent extends BaseRegisterComponent {
|
|||||||
environmentService: EnvironmentService,
|
environmentService: EnvironmentService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
auditService: AuditService,
|
auditService: AuditService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
formValidationErrorService,
|
formValidationErrorService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
|
||||||
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
@ -15,6 +14,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-set-password",
|
selector: "app-set-password",
|
||||||
@ -36,7 +36,7 @@ export class SetPasswordComponent extends BaseSetPasswordComponent {
|
|||||||
route: ActivatedRoute,
|
route: ActivatedRoute,
|
||||||
organizationApiService: OrganizationApiServiceAbstraction,
|
organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
organizationUserService: OrganizationUserService,
|
organizationUserService: OrganizationUserService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { TwoFactorComponent as BaseTwoFactorComponent } from "@bitwarden/angular/auth/components/two-factor.component";
|
import { TwoFactorComponent as BaseTwoFactorComponent } from "@bitwarden/angular/auth/components/two-factor.component";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { LoginService } from "@bitwarden/common/auth/abstractions/login.service";
|
import { LoginService } from "@bitwarden/common/auth/abstractions/login.service";
|
||||||
@ -18,6 +17,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserApi } from "../../platform/browser/browser-api";
|
import { BrowserApi } from "../../platform/browser/browser-api";
|
||||||
import { PopupUtilsService } from "../../popup/services/popup-utils.service";
|
import { PopupUtilsService } from "../../popup/services/popup-utils.service";
|
||||||
@ -48,7 +48,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
twoFactorService: TwoFactorService,
|
twoFactorService: TwoFactorService,
|
||||||
appIdService: AppIdService,
|
appIdService: AppIdService,
|
||||||
loginService: LoginService,
|
loginService: LoginService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
authService,
|
authService,
|
||||||
@ -107,7 +107,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "warning" },
|
title: { key: "warning" },
|
||||||
content: { key: "popup2faCloseMessage" },
|
content: { key: "popup2faCloseMessage" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
this.popupUtilsService.popOut(window);
|
this.popupUtilsService.popOut(window);
|
||||||
|
@ -12,12 +12,12 @@ import { IndividualConfig, ToastrService } from "ngx-toastr";
|
|||||||
import { filter, concatMap, Subject, takeUntil } from "rxjs";
|
import { filter, concatMap, Subject, takeUntil } from "rxjs";
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogOptions } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service";
|
import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService, SimpleDialogOptions } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserApi } from "../platform/browser/browser-api";
|
import { BrowserApi } from "../platform/browser/browser-api";
|
||||||
import { BrowserStateService } from "../platform/services/abstractions/browser-state.service";
|
import { BrowserStateService } from "../platform/services/abstractions/browser-state.service";
|
||||||
@ -50,7 +50,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
private ngZone: NgZone,
|
private ngZone: NgZone,
|
||||||
private sanitizer: DomSanitizer,
|
private sanitizer: DomSanitizer,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
import { Injectable } from "@angular/core";
|
|
||||||
import Swal, { SweetAlertIcon } from "sweetalert2";
|
|
||||||
|
|
||||||
import {
|
|
||||||
DialogService,
|
|
||||||
SimpleDialogOptions,
|
|
||||||
SimpleDialogType,
|
|
||||||
} from "@bitwarden/angular/services/dialog";
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class BrowserDialogService extends DialogService {
|
|
||||||
async openSimpleDialog(options: SimpleDialogOptions) {
|
|
||||||
const defaultCancel =
|
|
||||||
options.cancelButtonText === undefined
|
|
||||||
? options.acceptButtonText == null
|
|
||||||
? "no"
|
|
||||||
: "cancel"
|
|
||||||
: null;
|
|
||||||
|
|
||||||
return this.legacyShowDialog(
|
|
||||||
this.translate(options.content),
|
|
||||||
this.translate(options.title),
|
|
||||||
this.translate(options.acceptButtonText, "yes"),
|
|
||||||
this.translate(options.cancelButtonText, defaultCancel),
|
|
||||||
options.type
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async legacyShowDialog(
|
|
||||||
body: string,
|
|
||||||
title?: string,
|
|
||||||
confirmText?: string,
|
|
||||||
cancelText?: string,
|
|
||||||
type?: SimpleDialogType
|
|
||||||
) {
|
|
||||||
let iconClasses: string = null;
|
|
||||||
let icon: SweetAlertIcon = null;
|
|
||||||
if (type != null) {
|
|
||||||
// If you add custom types to this part, the type to SweetAlertIcon cast below needs to be changed.
|
|
||||||
switch (type) {
|
|
||||||
case "success":
|
|
||||||
iconClasses = "bwi-check text-success";
|
|
||||||
icon = "success";
|
|
||||||
break;
|
|
||||||
case "warning":
|
|
||||||
iconClasses = "bwi-exclamation-triangle text-warning";
|
|
||||||
icon = "warning";
|
|
||||||
break;
|
|
||||||
case "danger":
|
|
||||||
iconClasses = "bwi-error text-danger";
|
|
||||||
icon = "error";
|
|
||||||
break;
|
|
||||||
case "info":
|
|
||||||
iconClasses = "bwi-info-circle text-info";
|
|
||||||
icon = "info";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const confirmed = await Swal.fire({
|
|
||||||
heightAuto: false,
|
|
||||||
buttonsStyling: false,
|
|
||||||
icon: icon,
|
|
||||||
iconHtml:
|
|
||||||
iconClasses != null ? `<i class="swal-custom-icon bwi ${iconClasses}"></i>` : undefined,
|
|
||||||
text: body,
|
|
||||||
titleText: title,
|
|
||||||
showCancelButton: cancelText != null,
|
|
||||||
cancelButtonText: cancelText,
|
|
||||||
showConfirmButton: true,
|
|
||||||
confirmButtonText: confirmText == null ? this.i18nService.t("ok") : confirmText,
|
|
||||||
timer: 300000,
|
|
||||||
});
|
|
||||||
|
|
||||||
return confirmed.value;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,7 +2,6 @@ import { APP_INITIALIZER, LOCALE_ID, NgModule } from "@angular/core";
|
|||||||
|
|
||||||
import { LockGuard as BaseLockGuardService } from "@bitwarden/angular/auth/guards/lock.guard";
|
import { LockGuard as BaseLockGuardService } from "@bitwarden/angular/auth/guards/lock.guard";
|
||||||
import { UnauthGuard as BaseUnauthGuardService } from "@bitwarden/angular/auth/guards/unauth.guard";
|
import { UnauthGuard as BaseUnauthGuardService } from "@bitwarden/angular/auth/guards/unauth.guard";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { MEMORY_STORAGE, SECURE_STORAGE } from "@bitwarden/angular/services/injection-tokens";
|
import { MEMORY_STORAGE, SECURE_STORAGE } from "@bitwarden/angular/services/injection-tokens";
|
||||||
import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services.module";
|
import { JslibServicesModule } from "@bitwarden/angular/services/jslib-services.module";
|
||||||
import { ThemingService } from "@bitwarden/angular/services/theming/theming.service";
|
import { ThemingService } from "@bitwarden/angular/services/theming/theming.service";
|
||||||
@ -80,6 +79,7 @@ import {
|
|||||||
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service";
|
import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
||||||
|
|
||||||
import { BrowserOrganizationService } from "../../admin-console/services/browser-organization.service";
|
import { BrowserOrganizationService } from "../../admin-console/services/browser-organization.service";
|
||||||
@ -103,7 +103,6 @@ import { PasswordRepromptService } from "../../vault/popup/services/password-rep
|
|||||||
import { BrowserFolderService } from "../../vault/services/browser-folder.service";
|
import { BrowserFolderService } from "../../vault/services/browser-folder.service";
|
||||||
import { VaultFilterService } from "../../vault/services/vault-filter.service";
|
import { VaultFilterService } from "../../vault/services/vault-filter.service";
|
||||||
|
|
||||||
import { BrowserDialogService } from "./browser-dialog.service";
|
|
||||||
import { DebounceNavigationService } from "./debounceNavigationService";
|
import { DebounceNavigationService } from "./debounceNavigationService";
|
||||||
import { InitService } from "./init.service";
|
import { InitService } from "./init.service";
|
||||||
import { PopupSearchService } from "./popup-search.service";
|
import { PopupSearchService } from "./popup-search.service";
|
||||||
@ -133,6 +132,7 @@ function getBgService<T>(service: keyof MainBackground) {
|
|||||||
providers: [
|
providers: [
|
||||||
InitService,
|
InitService,
|
||||||
DebounceNavigationService,
|
DebounceNavigationService,
|
||||||
|
DialogService,
|
||||||
{
|
{
|
||||||
provide: LOCALE_ID,
|
provide: LOCALE_ID,
|
||||||
useFactory: () => getBgService<I18nServiceAbstraction>("i18nService")().translationLocale,
|
useFactory: () => getBgService<I18nServiceAbstraction>("i18nService")().translationLocale,
|
||||||
@ -502,10 +502,6 @@ function getBgService<T>(service: keyof MainBackground) {
|
|||||||
EnvironmentService,
|
EnvironmentService,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: DialogServiceAbstraction,
|
|
||||||
useClass: BrowserDialogService,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ServicesModule {}
|
export class ServicesModule {}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { CurrencyPipe, Location } from "@angular/common";
|
import { CurrencyPipe, Location } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component";
|
import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
@ -9,6 +8,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-premium",
|
selector: "app-premium",
|
||||||
@ -25,7 +25,7 @@ export class PremiumComponent extends BasePremiumComponent {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
private currencyPipe: CurrencyPipe,
|
private currencyPipe: CurrencyPipe,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
environmentService: EnvironmentService
|
environmentService: EnvironmentService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
|
@ -4,7 +4,6 @@ import { Router } from "@angular/router";
|
|||||||
import { concatMap, debounceTime, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
import { concatMap, debounceTime, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||||
@ -19,6 +18,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors";
|
import { BiometricErrors, BiometricErrorTypes } from "../../models/biometricErrors";
|
||||||
import { BrowserApi } from "../../platform/browser/browser-api";
|
import { BrowserApi } from "../../platform/browser/browser-api";
|
||||||
@ -84,7 +84,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
private popupUtilsService: PopupUtilsService,
|
private popupUtilsService: PopupUtilsService,
|
||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private keyConnectorService: KeyConnectorService,
|
private keyConnectorService: KeyConnectorService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -190,7 +190,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "warning" },
|
title: { key: "warning" },
|
||||||
content: { key: "neverLockWarning" },
|
content: { key: "neverLockWarning" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -226,7 +226,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
||||||
content: { key: "vaultTimeoutLogOutConfirmation" },
|
content: { key: "vaultTimeoutLogOutConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -289,7 +289,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: "nativeMessaginPermissionSidebarDesc" },
|
content: { key: "nativeMessaginPermissionSidebarDesc" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.controls.biometric.setValue(false);
|
this.form.controls.biometric.setValue(false);
|
||||||
@ -303,7 +303,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: "nativeMessaginPermissionErrorDesc" },
|
content: { key: "nativeMessaginPermissionErrorDesc" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.DANGER,
|
type: "danger",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.controls.biometric.setValue(false);
|
this.form.controls.biometric.setValue(false);
|
||||||
@ -358,7 +358,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: error.description },
|
content: { key: error.description },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.DANGER,
|
type: "danger",
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
@ -382,7 +382,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "logOut" },
|
title: { key: "logOut" },
|
||||||
content: { key: "logOutConfirmation" },
|
content: { key: "logOutConfirmation" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
@ -394,7 +394,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "changeMasterPassword" },
|
title: { key: "changeMasterPassword" },
|
||||||
content: { key: "changeMasterPasswordConfirmation" },
|
content: { key: "changeMasterPasswordConfirmation" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
BrowserApi.createNewTab(
|
BrowserApi.createNewTab(
|
||||||
@ -407,7 +407,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "twoStepLogin" },
|
title: { key: "twoStepLogin" },
|
||||||
content: { key: "twoStepLoginConfirmation" },
|
content: { key: "twoStepLoginConfirmation" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
BrowserApi.createNewTab("https://bitwarden.com/help/setup-two-step-login/");
|
BrowserApi.createNewTab("https://bitwarden.com/help/setup-two-step-login/");
|
||||||
@ -418,7 +418,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "learnOrg" },
|
title: { key: "learnOrg" },
|
||||||
content: { key: "learnOrgConfirmation" },
|
content: { key: "learnOrgConfirmation" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
BrowserApi.createNewTab("https://bitwarden.com/help/about-organizations/");
|
BrowserApi.createNewTab("https://bitwarden.com/help/about-organizations/");
|
||||||
|
@ -3,7 +3,6 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
@ -13,6 +12,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
||||||
import { PopupUtilsService } from "../../../popup/services/popup-utils.service";
|
import { PopupUtilsService } from "../../../popup/services/popup-utils.service";
|
||||||
@ -47,7 +47,7 @@ export class SendAddEditComponent extends BaseAddEditComponent {
|
|||||||
private popupUtilsService: PopupUtilsService,
|
private popupUtilsService: PopupUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { ChangeDetectorRef, Component, NgZone } from "@angular/core";
|
import { ChangeDetectorRef, Component, NgZone } from "@angular/core";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -15,6 +14,7 @@ import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
|||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserSendComponentState } from "../../../models/browserSendComponentState";
|
import { BrowserSendComponentState } from "../../../models/browserSendComponentState";
|
||||||
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
||||||
@ -51,7 +51,7 @@ export class SendGroupingsComponent extends BaseSendComponent {
|
|||||||
private broadcasterService: BroadcasterService,
|
private broadcasterService: BroadcasterService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
sendService,
|
sendService,
|
||||||
|
@ -3,7 +3,6 @@ import { ChangeDetectorRef, Component, NgZone } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -16,6 +15,7 @@ import { SendType } from "@bitwarden/common/tools/send/enums/send-type";
|
|||||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserComponentState } from "../../../models/browserComponentState";
|
import { BrowserComponentState } from "../../../models/browserComponentState";
|
||||||
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
import { BrowserStateService } from "../../../platform/services/abstractions/browser-state.service";
|
||||||
@ -51,7 +51,7 @@ export class SendTypeComponent extends BaseSendComponent {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
sendService,
|
sendService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { UntypedFormBuilder } from "@angular/forms";
|
import { UntypedFormBuilder } from "@angular/forms";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -12,6 +11,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -31,7 +31,7 @@ export class ExportComponent extends BaseExportComponent {
|
|||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
formBuilder: UntypedFormBuilder,
|
formBuilder: UntypedFormBuilder,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
|
@ -3,7 +3,6 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
@ -21,6 +20,7 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
|||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
||||||
import { PopupUtilsService } from "../../../../popup/services/popup-utils.service";
|
import { PopupUtilsService } from "../../../../popup/services/popup-utils.service";
|
||||||
@ -55,7 +55,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -3,7 +3,6 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
@ -13,6 +12,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-attachments",
|
selector: "app-vault-attachments",
|
||||||
@ -33,7 +33,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
|||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -4,7 +4,6 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component";
|
import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
@ -25,6 +24,7 @@ import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/pa
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { AutofillService } from "../../../../autofill/services/abstractions/autofill.service";
|
import { AutofillService } from "../../../../autofill/services/abstractions/autofill.service";
|
||||||
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
import { BrowserApi } from "../../../../platform/browser/browser-api";
|
||||||
@ -84,7 +84,7 @@ export class ViewComponent extends BaseViewComponent {
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -3,13 +3,13 @@ import { FormBuilder } from "@angular/forms";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-folder-add-edit",
|
selector: "app-folder-add-edit",
|
||||||
@ -25,7 +25,7 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
formBuilder: FormBuilder
|
formBuilder: FormBuilder
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
|
@ -3,7 +3,6 @@ import { FormBuilder } from "@angular/forms";
|
|||||||
import { Observable, Subject } from "rxjs";
|
import { Observable, Subject } from "rxjs";
|
||||||
import { concatMap, debounceTime, filter, map, takeUntil, tap } from "rxjs/operators";
|
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 { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction";
|
import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction";
|
||||||
import { SettingsService } from "@bitwarden/common/abstractions/settings.service";
|
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 { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { flagEnabled } from "../../platform/flags";
|
import { flagEnabled } from "../../platform/flags";
|
||||||
import { ElectronStateService } from "../../platform/services/electron-state.service.abstraction";
|
import { ElectronStateService } from "../../platform/services/electron-state.service.abstraction";
|
||||||
@ -111,7 +111,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private themingService: AbstractThemingService,
|
private themingService: AbstractThemingService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
const isMac = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop;
|
const isMac = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop;
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "warning" },
|
title: { key: "warning" },
|
||||||
content: { key: "neverLockWarning" },
|
content: { key: "neverLockWarning" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -336,7 +336,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
||||||
content: { key: "vaultTimeoutLogOutConfirmation" },
|
content: { key: "vaultTimeoutLogOutConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -465,7 +465,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
const confirm = await this.dialogService.openSimpleDialog({
|
const confirm = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "confirmTrayTitle" },
|
title: { key: "confirmTrayTitle" },
|
||||||
content: { key: "confirmTrayDesc" },
|
content: { key: "confirmTrayDesc" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
@ -527,7 +527,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: "browserIntegrationMasOnlyDesc" },
|
content: { key: "browserIntegrationMasOnlyDesc" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.controls.enableBrowserIntegration.setValue(false);
|
this.form.controls.enableBrowserIntegration.setValue(false);
|
||||||
@ -538,7 +538,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: "browserIntegrationWindowsStoreDesc" },
|
content: { key: "browserIntegrationWindowsStoreDesc" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.controls.enableBrowserIntegration.setValue(false);
|
this.form.controls.enableBrowserIntegration.setValue(false);
|
||||||
@ -549,7 +549,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
content: { key: "browserIntegrationLinuxDesc" },
|
content: { key: "browserIntegrationLinuxDesc" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.form.controls.enableBrowserIntegration.setValue(false);
|
this.form.controls.enableBrowserIntegration.setValue(false);
|
||||||
|
@ -15,7 +15,6 @@ import { IndividualConfig, ToastrService } from "ngx-toastr";
|
|||||||
import { firstValueFrom, Subject, takeUntil } from "rxjs";
|
import { firstValueFrom, Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
|
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
|
||||||
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
|
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
|
||||||
@ -43,6 +42,7 @@ import { CollectionService } from "@bitwarden/common/vault/abstractions/collecti
|
|||||||
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { DeleteAccountComponent } from "../auth/delete-account.component";
|
import { DeleteAccountComponent } from "../auth/delete-account.component";
|
||||||
import { LoginApprovalComponent } from "../auth/login/login-approval.component";
|
import { LoginApprovalComponent } from "../auth/login/login-approval.component";
|
||||||
@ -138,7 +138,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private keyConnectorService: KeyConnectorService,
|
private keyConnectorService: KeyConnectorService,
|
||||||
private configService: ConfigServiceAbstraction,
|
private configService: ConfigServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -246,7 +246,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
this.i18nService.t("yourAccountsFingerprint") + ":\n" + fingerprint.join("-"),
|
this.i18nService.t("yourAccountsFingerprint") + ":\n" + fingerprint.join("-"),
|
||||||
acceptButtonText: { key: "learnMore" },
|
acceptButtonText: { key: "learnMore" },
|
||||||
cancelButtonText: { key: "close" },
|
cancelButtonText: { key: "close" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
@ -281,7 +281,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
title: { key: "premiumRequired" },
|
title: { key: "premiumRequired" },
|
||||||
content: { key: "premiumRequiredDesc" },
|
content: { key: "premiumRequiredDesc" },
|
||||||
acceptButtonText: { key: "learnMore" },
|
acceptButtonText: { key: "learnMore" },
|
||||||
type: SimpleDialogType.SUCCESS,
|
type: "success",
|
||||||
});
|
});
|
||||||
if (premiumConfirmed) {
|
if (premiumConfirmed) {
|
||||||
await this.openModal<PremiumComponent>(PremiumComponent, this.premiumRef);
|
await this.openModal<PremiumComponent>(PremiumComponent, this.premiumRef);
|
||||||
@ -293,7 +293,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
title: { key: "emailVerificationRequired" },
|
title: { key: "emailVerificationRequired" },
|
||||||
content: { key: "emailVerificationRequiredDesc" },
|
content: { key: "emailVerificationRequiredDesc" },
|
||||||
acceptButtonText: { key: "learnMore" },
|
acceptButtonText: { key: "learnMore" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (emailVerificationConfirmed) {
|
if (emailVerificationConfirmed) {
|
||||||
this.platformUtilsService.launchUri(
|
this.platformUtilsService.launchUri(
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { APP_INITIALIZER, InjectionToken, NgModule } from "@angular/core";
|
import { APP_INITIALIZER, InjectionToken, NgModule } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import {
|
import {
|
||||||
SECURE_STORAGE,
|
SECURE_STORAGE,
|
||||||
STATE_FACTORY,
|
STATE_FACTORY,
|
||||||
@ -40,6 +39,7 @@ import { SystemService } from "@bitwarden/common/platform/services/system.servic
|
|||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService as PasswordRepromptServiceAbstraction } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { LoginGuard } from "../../auth/guards/login.guard";
|
import { LoginGuard } from "../../auth/guards/login.guard";
|
||||||
import { Account } from "../../models/account";
|
import { Account } from "../../models/account";
|
||||||
@ -52,7 +52,6 @@ import { ElectronRendererStorageService } from "../../platform/services/electron
|
|||||||
import { ElectronStateService } from "../../platform/services/electron-state.service";
|
import { ElectronStateService } from "../../platform/services/electron-state.service";
|
||||||
import { ElectronStateService as ElectronStateServiceAbstraction } from "../../platform/services/electron-state.service.abstraction";
|
import { ElectronStateService as ElectronStateServiceAbstraction } from "../../platform/services/electron-state.service.abstraction";
|
||||||
import { I18nService } from "../../platform/services/i18n.service";
|
import { I18nService } from "../../platform/services/i18n.service";
|
||||||
import { ElectronDialogService } from "../../services/electron-dialog.service";
|
|
||||||
import { EncryptedMessageHandlerService } from "../../services/encrypted-message-handler.service";
|
import { EncryptedMessageHandlerService } from "../../services/encrypted-message-handler.service";
|
||||||
import { NativeMessageHandlerService } from "../../services/native-message-handler.service";
|
import { NativeMessageHandlerService } from "../../services/native-message-handler.service";
|
||||||
import { NativeMessagingService } from "../../services/native-messaging.service";
|
import { NativeMessagingService } from "../../services/native-messaging.service";
|
||||||
@ -73,6 +72,7 @@ const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
|
|||||||
NativeMessagingService,
|
NativeMessagingService,
|
||||||
SearchBarService,
|
SearchBarService,
|
||||||
LoginGuard,
|
LoginGuard,
|
||||||
|
DialogService,
|
||||||
{
|
{
|
||||||
provide: APP_INITIALIZER,
|
provide: APP_INITIALIZER,
|
||||||
useFactory: (initService: InitService) => initService.init(),
|
useFactory: (initService: InitService) => initService.init(),
|
||||||
@ -178,10 +178,6 @@ const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
|
|||||||
useClass: LoginService,
|
useClass: LoginService,
|
||||||
deps: [StateServiceAbstraction],
|
deps: [StateServiceAbstraction],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: DialogServiceAbstraction,
|
|
||||||
useClass: ElectronDialogService,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: CryptoServiceAbstraction,
|
provide: CryptoServiceAbstraction,
|
||||||
useClass: ElectronCryptoService,
|
useClass: ElectronCryptoService,
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import * as os from "os";
|
|
||||||
|
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { UntypedFormBuilder } from "@angular/forms";
|
import { UntypedFormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -14,6 +11,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "ExportComponent";
|
const BroadcasterSubscriptionId = "ExportComponent";
|
||||||
@ -35,7 +33,7 @@ export class ExportComponent extends BaseExportComponent implements OnInit {
|
|||||||
private broadcasterService: BroadcasterService,
|
private broadcasterService: BroadcasterService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
@ -56,26 +54,4 @@ export class ExportComponent extends BaseExportComponent implements OnInit {
|
|||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async warningDialog() {
|
|
||||||
if (this.encryptedFormat) {
|
|
||||||
return await this.dialogService.openSimpleDialog({
|
|
||||||
title: { key: "confirmVaultExport" },
|
|
||||||
content:
|
|
||||||
this.i18nService.t("encExportKeyWarningDesc") +
|
|
||||||
os.EOL +
|
|
||||||
os.EOL +
|
|
||||||
this.i18nService.t("encExportAccountWarningDesc"),
|
|
||||||
acceptButtonText: { key: "exportVault" },
|
|
||||||
type: SimpleDialogType.WARNING,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return await this.dialogService.openSimpleDialog({
|
|
||||||
title: { key: "confirmVaultExport" },
|
|
||||||
content: { key: "exportWarningDesc" },
|
|
||||||
acceptButtonText: { key: "exportVault" },
|
|
||||||
type: SimpleDialogType.WARNING,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { DatePipe } from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
@ -12,6 +11,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-send-add-edit",
|
selector: "app-send-add-edit",
|
||||||
@ -29,7 +29,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
policyService: PolicyService,
|
policyService: PolicyService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, NgZone, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
import { Component, NgZone, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -12,6 +11,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { invokeMenu, RendererMenuItem } from "../../../utils";
|
import { invokeMenu, RendererMenuItem } from "../../../utils";
|
||||||
import { SearchBarService } from "../../layout/search/search-bar.service";
|
import { SearchBarService } from "../../layout/search/search-bar.service";
|
||||||
@ -48,7 +48,7 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro
|
|||||||
private searchBarService: SearchBarService,
|
private searchBarService: SearchBarService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
sendService,
|
sendService,
|
||||||
|
@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
import { ipcRenderer } from "electron";
|
import { ipcRenderer } from "electron";
|
||||||
|
|
||||||
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||||
@ -19,6 +18,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ElectronStateService } from "../platform/services/electron-state.service.abstraction";
|
import { ElectronStateService } from "../platform/services/electron-state.service.abstraction";
|
||||||
import { BiometricStorageAction, BiometricMessage } from "../types/biometric-message";
|
import { BiometricStorageAction, BiometricMessage } from "../types/biometric-message";
|
||||||
@ -52,7 +52,7 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
keyConnectorService: KeyConnectorService,
|
keyConnectorService: KeyConnectorService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
router,
|
router,
|
||||||
@ -155,7 +155,7 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
const response = await this.dialogService.openSimpleDialog({
|
const response = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "windowsBiometricUpdateWarningTitle" },
|
title: { key: "windowsBiometricUpdateWarningTitle" },
|
||||||
content: { key: "windowsBiometricUpdateWarning" },
|
content: { key: "windowsBiometricUpdateWarning" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.stateService.setBiometricRequirePasswordOnStart(response);
|
await this.stateService.setBiometricRequirePasswordOnStart(response);
|
||||||
|
@ -4,7 +4,6 @@ import { Router } from "@angular/router";
|
|||||||
|
|
||||||
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
||||||
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
@ -16,6 +15,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "RegisterComponent";
|
const BroadcasterSubscriptionId = "RegisterComponent";
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ export class RegisterComponent extends BaseRegisterComponent implements OnInit,
|
|||||||
private ngZone: NgZone,
|
private ngZone: NgZone,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
auditService: AuditService,
|
auditService: AuditService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
formValidationErrorService,
|
formValidationErrorService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component, NgZone, OnDestroy } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
|
||||||
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
@ -16,6 +15,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "SetPasswordComponent";
|
const BroadcasterSubscriptionId = "SetPasswordComponent";
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ export class SetPasswordComponent extends BaseSetPasswordComponent implements On
|
|||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
organizationApiService: OrganizationApiServiceAbstraction,
|
organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
organizationUserService: OrganizationUserService,
|
organizationUserService: OrganizationUserService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
import { ipcRenderer } from "electron";
|
|
||||||
|
|
||||||
import {
|
|
||||||
DialogService,
|
|
||||||
SimpleDialogOptions,
|
|
||||||
SimpleDialogType,
|
|
||||||
} from "@bitwarden/angular/services/dialog";
|
|
||||||
|
|
||||||
// Electron supports a limited set of dialog types
|
|
||||||
// https://www.electronjs.org/docs/latest/api/dialog#dialogshowmessageboxbrowserwindow-options
|
|
||||||
const electronTypeMap: Record<SimpleDialogType, string> = {
|
|
||||||
[SimpleDialogType.PRIMARY]: "info",
|
|
||||||
[SimpleDialogType.SUCCESS]: "info",
|
|
||||||
[SimpleDialogType.INFO]: "info",
|
|
||||||
[SimpleDialogType.WARNING]: "warning",
|
|
||||||
[SimpleDialogType.DANGER]: "error",
|
|
||||||
};
|
|
||||||
|
|
||||||
export class ElectronDialogService extends DialogService {
|
|
||||||
async openSimpleDialog(options: SimpleDialogOptions) {
|
|
||||||
const defaultCancel =
|
|
||||||
options.cancelButtonText === undefined
|
|
||||||
? options.acceptButtonText == null
|
|
||||||
? "no"
|
|
||||||
: "cancel"
|
|
||||||
: null;
|
|
||||||
|
|
||||||
return this.legacyShowDialog(
|
|
||||||
this.translate(options.content),
|
|
||||||
this.translate(options.title),
|
|
||||||
this.translate(options.acceptButtonText, "yes"),
|
|
||||||
this.translate(options.cancelButtonText, defaultCancel),
|
|
||||||
options.type
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async legacyShowDialog(
|
|
||||||
body: string,
|
|
||||||
title?: string,
|
|
||||||
confirmText?: string,
|
|
||||||
cancelText?: string,
|
|
||||||
type?: SimpleDialogType
|
|
||||||
) {
|
|
||||||
const buttons = [confirmText == null ? this.i18nService.t("ok") : confirmText];
|
|
||||||
if (cancelText != null) {
|
|
||||||
buttons.push(cancelText);
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await ipcRenderer.invoke("showMessageBox", {
|
|
||||||
type: electronTypeMap[type] ?? "none",
|
|
||||||
title: title,
|
|
||||||
message: title,
|
|
||||||
detail: body,
|
|
||||||
buttons: buttons,
|
|
||||||
cancelId: buttons.length === 2 ? 1 : null,
|
|
||||||
defaultId: 0,
|
|
||||||
noLink: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
return Promise.resolve(result.response === 0);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component";
|
import { PremiumComponent as BasePremiumComponent } from "@bitwarden/angular/vault/components/premium.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
@ -8,6 +7,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-premium",
|
selector: "app-premium",
|
||||||
@ -20,7 +20,7 @@ export class PremiumComponent extends BasePremiumComponent {
|
|||||||
apiService: ApiService,
|
apiService: ApiService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
environmentService: EnvironmentService
|
environmentService: EnvironmentService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component, NgZone, OnChanges, OnDestroy, ViewChild } from "@angular/core";
|
import { Component, NgZone, OnChanges, OnDestroy, ViewChild } from "@angular/core";
|
||||||
import { NgForm } from "@angular/forms";
|
import { NgForm } from "@angular/forms";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
@ -18,6 +17,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "AddEditComponent";
|
const BroadcasterSubscriptionId = "AddEditComponent";
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges,
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
organizationService: OrganizationService,
|
organizationService: OrganizationService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
@ -10,6 +9,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-attachments",
|
selector: "app-vault-attachments",
|
||||||
@ -25,7 +25,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-folder-add-edit",
|
selector: "app-folder-add-edit",
|
||||||
@ -20,7 +20,7 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
|||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService,
|
platformUtilsService: PlatformUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
formBuilder: FormBuilder
|
formBuilder: FormBuilder
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
|
@ -11,7 +11,6 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model";
|
import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-filter.model";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
@ -29,6 +28,7 @@ import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-repromp
|
|||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { SearchBarService } from "../../../app/layout/search/search-bar.service";
|
import { SearchBarService } from "../../../app/layout/search/search-bar.service";
|
||||||
import { GeneratorComponent } from "../../../app/tools/generator.component";
|
import { GeneratorComponent } from "../../../app/tools/generator.component";
|
||||||
@ -102,7 +102,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
private searchBarService: SearchBarService,
|
private searchBarService: SearchBarService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -684,7 +684,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "unsavedChangesTitle" },
|
title: { key: "unsavedChangesTitle" },
|
||||||
content: { key: "unsavedChangesConfirmation" },
|
content: { key: "unsavedChangesConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
return !confirmed;
|
return !confirmed;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
} from "@angular/core";
|
} from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component";
|
import { ViewComponent as BaseViewComponent } from "@bitwarden/angular/vault/components/view.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
@ -26,6 +25,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
const BroadcasterSubscriptionId = "ViewComponent";
|
const BroadcasterSubscriptionId = "ViewComponent";
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ export class ViewComponent extends BaseViewComponent implements OnChanges {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
|
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: "root",
|
providedIn: "root",
|
||||||
@ -13,7 +13,7 @@ export class IsPaidOrgGuard implements CanActivate {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||||
@ -31,7 +31,7 @@ export class IsPaidOrgGuard implements CanActivate {
|
|||||||
content: { key: "notAvailableForFreeOrganization" },
|
content: { key: "notAvailableForFreeOrganization" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,7 +3,6 @@ import { Component, Inject, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { EventResponse } from "@bitwarden/common/models/response/event.response";
|
import { EventResponse } from "@bitwarden/common/models/response/event.response";
|
||||||
@ -13,7 +12,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
import { TableDataSource } from "@bitwarden/components";
|
import { DialogService, TableDataSource } from "@bitwarden/components";
|
||||||
|
|
||||||
import { EventService } from "../../../core";
|
import { EventService } from "../../../core";
|
||||||
import { SharedModule } from "../../../shared";
|
import { SharedModule } from "../../../shared";
|
||||||
@ -186,7 +185,7 @@ export class EntityEventsComponent implements OnInit {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openEntityEventsDialog = (
|
export const openEntityEventsDialog = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<EntityEventsDialogParams>
|
config: DialogConfig<EntityEventsDialogParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<void, EntityEventsDialogParams>(EntityEventsComponent, config);
|
return dialogService.open<void, EntityEventsDialogParams>(EntityEventsComponent, config);
|
||||||
|
@ -3,7 +3,6 @@ import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from "@angula
|
|||||||
import { FormBuilder, Validators } from "@angular/forms";
|
import { FormBuilder, Validators } from "@angular/forms";
|
||||||
import { catchError, combineLatest, from, map, of, Subject, switchMap, takeUntil } from "rxjs";
|
import { catchError, combineLatest, from, map, of, Subject, switchMap, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { ErrorResponse } from "@bitwarden/common/models/response/error.response";
|
import { ErrorResponse } from "@bitwarden/common/models/response/error.response";
|
||||||
@ -14,6 +13,7 @@ import { CollectionService } from "@bitwarden/common/vault/abstractions/collecti
|
|||||||
import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data";
|
import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data";
|
||||||
import { Collection } from "@bitwarden/common/vault/models/domain/collection";
|
import { Collection } from "@bitwarden/common/vault/models/domain/collection";
|
||||||
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { InternalGroupService as GroupService, GroupView } from "../core";
|
import { InternalGroupService as GroupService, GroupView } from "../core";
|
||||||
import {
|
import {
|
||||||
@ -64,7 +64,7 @@ export enum GroupAddEditDialogResultType {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openGroupAddEditDialog = (
|
export const openGroupAddEditDialog = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<GroupAddEditDialogParams>
|
config: DialogConfig<GroupAddEditDialogParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<GroupAddEditDialogResultType, GroupAddEditDialogParams>(
|
return dialogService.open<GroupAddEditDialogResultType, GroupAddEditDialogParams>(
|
||||||
@ -181,7 +181,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private changeDetectorRef: ChangeDetectorRef,
|
private changeDetectorRef: ChangeDetectorRef,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
this.tabIndex = params.initialTab ?? GroupAddEditTabType.Info;
|
this.tabIndex = params.initialTab ?? GroupAddEditTabType.Info;
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ export class GroupAddEditComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: this.group.name,
|
title: this.group.name,
|
||||||
content: { key: "deleteGroupConfirmation" },
|
content: { key: "deleteGroupConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -15,7 +15,6 @@ import {
|
|||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -32,6 +31,7 @@ import {
|
|||||||
CollectionResponse,
|
CollectionResponse,
|
||||||
} from "@bitwarden/common/vault/models/response/collection.response";
|
} from "@bitwarden/common/vault/models/response/collection.response";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { InternalGroupService as GroupService, GroupView } from "../core";
|
import { InternalGroupService as GroupService, GroupView } from "../core";
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private searchService: SearchService,
|
private searchService: SearchService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
@ -236,7 +236,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: groupRow.details.name,
|
title: groupRow.details.name,
|
||||||
content: { key: "deleteGroupConfirmation" },
|
content: { key: "deleteGroupConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
return false;
|
return false;
|
||||||
@ -269,7 +269,7 @@ export class GroupsComponent implements OnInit, OnDestroy {
|
|||||||
placeholders: [groupsToDelete.length.toString()],
|
placeholders: [groupsToDelete.length.toString()],
|
||||||
},
|
},
|
||||||
content: deleteMessage,
|
content: deleteMessage,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||||
import { Component, Inject, OnInit } from "@angular/core";
|
import { Component, Inject, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { TableDataSource } from "@bitwarden/components";
|
import { DialogService, TableDataSource } from "@bitwarden/components";
|
||||||
|
|
||||||
import { OrganizationUserView } from "../../../core";
|
import { OrganizationUserView } from "../../../core";
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ export class BulkEnableSecretsManagerDialogComponent implements OnInit {
|
|||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
};
|
};
|
||||||
|
|
||||||
static open(dialogService: DialogServiceAbstraction, data: BulkEnableSecretsManagerDialogData) {
|
static open(dialogService: DialogService, data: BulkEnableSecretsManagerDialogData) {
|
||||||
return dialogService.open<unknown, BulkEnableSecretsManagerDialogData>(
|
return dialogService.open<unknown, BulkEnableSecretsManagerDialogData>(
|
||||||
BulkEnableSecretsManagerDialogComponent,
|
BulkEnableSecretsManagerDialogComponent,
|
||||||
{ data }
|
{ data }
|
||||||
|
@ -3,7 +3,6 @@ import { Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder, Validators } from "@angular/forms";
|
import { FormBuilder, Validators } from "@angular/forms";
|
||||||
import { combineLatest, of, shareReplay, Subject, switchMap, takeUntil } from "rxjs";
|
import { combineLatest, of, shareReplay, Subject, switchMap, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import {
|
import {
|
||||||
@ -15,6 +14,7 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { flagEnabled } from "../../../../../../utils/flags";
|
import { flagEnabled } from "../../../../../../utils/flags";
|
||||||
import { CollectionAdminService } from "../../../../../vault/core/collection-admin.service";
|
import { CollectionAdminService } from "../../../../../vault/core/collection-admin.service";
|
||||||
@ -134,7 +134,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
|||||||
private groupService: GroupService,
|
private groupService: GroupService,
|
||||||
private userService: UserAdminService,
|
private userService: UserAdminService,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -389,7 +389,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
|||||||
let confirmed = await this.dialogService.openSimpleDialog({
|
let confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "removeUserIdAccess", placeholders: [this.params.name] },
|
title: { key: "removeUserIdAccess", placeholders: [this.params.name] },
|
||||||
content: { key: message },
|
content: { key: message },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -426,7 +426,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
|||||||
title: { key: "revokeUserId", placeholders: [this.params.name] },
|
title: { key: "revokeUserId", placeholders: [this.params.name] },
|
||||||
content: { key: "revokeUserConfirmation" },
|
content: { key: "revokeUserConfirmation" },
|
||||||
acceptButtonText: { key: "revokeAccess" },
|
acceptButtonText: { key: "revokeAccess" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -496,7 +496,7 @@ export class MemberDialogComponent implements OnInit, OnDestroy {
|
|||||||
key: "removeOrgUserNoMasterPasswordDesc",
|
key: "removeOrgUserNoMasterPasswordDesc",
|
||||||
placeholders: [this.params.name],
|
placeholders: [this.params.name],
|
||||||
},
|
},
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -557,7 +557,7 @@ function mapToGroupAccessSelections(groups: string[]): AccessItemValue[] {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export function openUserAddEditDialog(
|
export function openUserAddEditDialog(
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<MemberDialogParams>
|
config: DialogConfig<MemberDialogParams>
|
||||||
) {
|
) {
|
||||||
return dialogService.open<MemberDialogResult, MemberDialogParams>(MemberDialogComponent, config);
|
return dialogService.open<MemberDialogResult, MemberDialogParams>(MemberDialogComponent, config);
|
||||||
|
@ -10,7 +10,6 @@ import {
|
|||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
import zxcvbn from "zxcvbn";
|
import zxcvbn from "zxcvbn";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { PasswordStrengthComponent } from "@bitwarden/angular/shared/components/password-strength/password-strength.component";
|
import { PasswordStrengthComponent } from "@bitwarden/angular/shared/components/password-strength/password-strength.component";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationUserResetPasswordRequest } from "@bitwarden/common/abstractions/organization-user/requests";
|
import { OrganizationUserResetPasswordRequest } from "@bitwarden/common/abstractions/organization-user/requests";
|
||||||
@ -25,6 +24,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
|
|||||||
import { EncString } from "@bitwarden/common/platform/models/domain/enc-string";
|
import { EncString } from "@bitwarden/common/platform/models/domain/enc-string";
|
||||||
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-reset-password",
|
selector: "app-reset-password",
|
||||||
@ -54,7 +54,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
|
|||||||
private cryptoService: CryptoService,
|
private cryptoService: CryptoService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -140,7 +140,7 @@ export class ResetPasswordComponent implements OnInit, OnDestroy {
|
|||||||
const result = await this.dialogService.openSimpleDialog({
|
const result = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "weakMasterPassword" },
|
title: { key: "weakMasterPassword" },
|
||||||
content: { key: "weakMasterPasswordDesc" },
|
content: { key: "weakMasterPasswordDesc" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -16,12 +16,6 @@ import {
|
|||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
||||||
import {
|
|
||||||
DialogServiceAbstraction,
|
|
||||||
SimpleDialogCloseType,
|
|
||||||
SimpleDialogOptions,
|
|
||||||
SimpleDialogType,
|
|
||||||
} from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
@ -55,6 +49,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data";
|
import { CollectionData } from "@bitwarden/common/vault/models/data/collection.data";
|
||||||
import { Collection } from "@bitwarden/common/vault/models/domain/collection";
|
import { Collection } from "@bitwarden/common/vault/models/domain/collection";
|
||||||
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
||||||
|
import { DialogService, SimpleDialogOptions } from "@bitwarden/components";
|
||||||
|
|
||||||
import { flagEnabled } from "../../../../utils/flags";
|
import { flagEnabled } from "../../../../utils/flags";
|
||||||
import { openEntityEventsDialog } from "../../../admin-console/organizations/manage/entity-events.component";
|
import { openEntityEventsDialog } from "../../../admin-console/organizations/manage/entity-events.component";
|
||||||
@ -125,7 +120,7 @@ export class PeopleComponent
|
|||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private groupService: GroupService,
|
private groupService: GroupService,
|
||||||
private collectionService: CollectionService
|
private collectionService: CollectionService
|
||||||
@ -359,7 +354,7 @@ export class PeopleComponent
|
|||||||
: "freeOrgInvLimitReachedNoManageBilling",
|
: "freeOrgInvLimitReachedNoManageBilling",
|
||||||
this.organization.seats
|
this.organization.seats
|
||||||
),
|
),
|
||||||
type: SimpleDialogType.PRIMARY,
|
type: "primary",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.organization.canEditSubscription) {
|
if (this.organization.canEditSubscription) {
|
||||||
@ -371,12 +366,12 @@ export class PeopleComponent
|
|||||||
|
|
||||||
const simpleDialog = this.dialogService.openSimpleDialogRef(orgUpgradeSimpleDialogOpts);
|
const simpleDialog = this.dialogService.openSimpleDialogRef(orgUpgradeSimpleDialogOpts);
|
||||||
|
|
||||||
firstValueFrom(simpleDialog.closed).then((result: SimpleDialogCloseType | undefined) => {
|
firstValueFrom(simpleDialog.closed).then((result: boolean | undefined) => {
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == SimpleDialogCloseType.ACCEPT && this.organization.canEditSubscription) {
|
if (result && this.organization.canEditSubscription) {
|
||||||
this.router.navigate(["/organizations", this.organization.id, "billing", "subscription"], {
|
this.router.navigate(["/organizations", this.organization.id, "billing", "subscription"], {
|
||||||
queryParams: { upgrade: true },
|
queryParams: { upgrade: true },
|
||||||
});
|
});
|
||||||
@ -581,7 +576,7 @@ export class PeopleComponent
|
|||||||
placeholders: [this.userNamePipe.transform(user)],
|
placeholders: [this.userNamePipe.transform(user)],
|
||||||
},
|
},
|
||||||
content: { key: content },
|
content: { key: content },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -600,7 +595,7 @@ export class PeopleComponent
|
|||||||
title: { key: "revokeAccess", placeholders: [this.userNamePipe.transform(user)] },
|
title: { key: "revokeAccess", placeholders: [this.userNamePipe.transform(user)] },
|
||||||
content: this.revokeWarningMessage(),
|
content: this.revokeWarningMessage(),
|
||||||
acceptButtonText: { key: "revokeAccess" },
|
acceptButtonText: { key: "revokeAccess" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -676,7 +671,7 @@ export class PeopleComponent
|
|||||||
key: "removeOrgUserNoMasterPasswordDesc",
|
key: "removeOrgUserNoMasterPasswordDesc",
|
||||||
placeholders: [this.userNamePipe.transform(user)],
|
placeholders: [this.userNamePipe.transform(user)],
|
||||||
},
|
},
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ import { FormBuilder, Validators } from "@angular/forms";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { combineLatest, lastValueFrom, Subject, switchMap, takeUntil, from } from "rxjs";
|
import { combineLatest, lastValueFrom, Subject, switchMap, takeUntil, from } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
@ -15,6 +14,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ApiKeyComponent } from "../../../settings/api-key.component";
|
import { ApiKeyComponent } from "../../../settings/api-key.component";
|
||||||
import { PurgeVaultComponent } from "../../../settings/purge-vault.component";
|
import { PurgeVaultComponent } from "../../../settings/purge-vault.component";
|
||||||
@ -75,7 +75,7 @@ export class AccountComponent {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private formBuilder: FormBuilder
|
private formBuilder: FormBuilder
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import { Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder, FormControl, Validators } from "@angular/forms";
|
import { FormBuilder, FormControl, Validators } from "@angular/forms";
|
||||||
import { combineLatest, Subject, takeUntil } from "rxjs";
|
import { combineLatest, Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
@ -15,6 +14,7 @@ import { Verification } from "@bitwarden/common/types/verification";
|
|||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { UserVerificationModule } from "../../../../auth/shared/components/user-verification";
|
import { UserVerificationModule } from "../../../../auth/shared/components/user-verification";
|
||||||
import { SharedModule } from "../../../../shared/shared.module";
|
import { SharedModule } from "../../../../shared/shared.module";
|
||||||
@ -168,7 +168,7 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export function openDeleteOrganizationDialog(
|
export function openDeleteOrganizationDialog(
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<DeleteOrganizationDialogParams>
|
config: DialogConfig<DeleteOrganizationDialogParams>
|
||||||
) {
|
) {
|
||||||
return dialogService.open<DeleteOrganizationDialogResult, DeleteOrganizationDialogParams>(
|
return dialogService.open<DeleteOrganizationDialogResult, DeleteOrganizationDialogParams>(
|
||||||
|
@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from "@angular/router";
|
|||||||
import { lastValueFrom, Observable, Subject } from "rxjs";
|
import { lastValueFrom, Observable, Subject } from "rxjs";
|
||||||
import { first, map, takeUntil } from "rxjs/operators";
|
import { first, map, takeUntil } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
@ -14,6 +13,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { OrganizationPlansComponent } from "../../../billing/settings/organization-plans.component";
|
import { OrganizationPlansComponent } from "../../../billing/settings/organization-plans.component";
|
||||||
import {
|
import {
|
||||||
@ -62,7 +62,7 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
|
|||||||
private syncService: SyncService,
|
private syncService: SyncService,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { UntypedFormBuilder } from "@angular/forms";
|
import { UntypedFormBuilder } from "@angular/forms";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
@ -12,6 +11,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
||||||
|
|
||||||
import { ExportComponent } from "../../../../tools/import-export/export.component";
|
import { ExportComponent } from "../../../../tools/import-export/export.component";
|
||||||
@ -34,7 +34,7 @@ export class OrganizationExportComponent extends ExportComponent {
|
|||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
formBuilder: UntypedFormBuilder,
|
formBuilder: UntypedFormBuilder,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
|
@ -3,7 +3,6 @@ import { FormBuilder } from "@angular/forms";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { switchMap, takeUntil } from "rxjs/operators";
|
import { switchMap, takeUntil } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import {
|
import {
|
||||||
canAccessVaultTab,
|
canAccessVaultTab,
|
||||||
@ -17,6 +16,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { ImportServiceAbstraction } from "@bitwarden/importer";
|
import { ImportServiceAbstraction } from "@bitwarden/importer";
|
||||||
|
|
||||||
import { ImportComponent } from "../../../../tools/import-export/import.component";
|
import { ImportComponent } from "../../../../tools/import-export/import.component";
|
||||||
@ -44,7 +44,7 @@ export class OrganizationImportComponent extends ImportComponent {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
modalService: ModalService,
|
modalService: ModalService,
|
||||||
syncService: SyncService,
|
syncService: SyncService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
folderService: FolderService,
|
folderService: FolderService,
|
||||||
collectionService: CollectionService,
|
collectionService: CollectionService,
|
||||||
formBuilder: FormBuilder
|
formBuilder: FormBuilder
|
||||||
@ -91,7 +91,7 @@ export class OrganizationImportComponent extends ImportComponent {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "warning" },
|
title: { key: "warning" },
|
||||||
content: { key: "importWarning", placeholders: [this.organization.name] },
|
content: { key: "importWarning", placeholders: [this.organization.name] },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -2,12 +2,12 @@ import { formatDate } from "@angular/common";
|
|||||||
import { Component, EventEmitter, Input, Output, OnInit } from "@angular/core";
|
import { Component, EventEmitter, Input, Output, OnInit } from "@angular/core";
|
||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "[sponsoring-org-row]",
|
selector: "[sponsoring-org-row]",
|
||||||
@ -32,7 +32,7 @@ export class SponsoringOrgRowComponent implements OnInit {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -73,7 +73,7 @@ export class SponsoringOrgRowComponent implements OnInit {
|
|||||||
title: `${this.i18nService.t("remove")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,
|
title: `${this.i18nService.t("remove")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,
|
||||||
content: { key: "revokeSponsorshipConfirmation" },
|
content: { key: "revokeSponsorshipConfirmation" },
|
||||||
acceptButtonText: { key: "remove" },
|
acceptButtonText: { key: "remove" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -7,7 +7,6 @@ import { IndividualConfig, ToastrService } from "ngx-toastr";
|
|||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
import Swal from "sweetalert2";
|
import Swal from "sweetalert2";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
|
import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service";
|
||||||
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
|
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -27,6 +26,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
||||||
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { PolicyListService } from "./admin-console/core/policy-list.service";
|
import { PolicyListService } from "./admin-console/core/policy-list.service";
|
||||||
import {
|
import {
|
||||||
@ -82,7 +82,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
protected policyListService: PolicyListService,
|
protected policyListService: PolicyListService,
|
||||||
private keyConnectorService: KeyConnectorService,
|
private keyConnectorService: KeyConnectorService,
|
||||||
private configService: ConfigServiceAbstraction,
|
private configService: ConfigServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -145,7 +145,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
title: { key: "upgradeOrganization" },
|
title: { key: "upgradeOrganization" },
|
||||||
content: { key: "upgradeOrganizationDesc" },
|
content: { key: "upgradeOrganizationDesc" },
|
||||||
acceptButtonText: { key: "upgradeOrganization" },
|
acceptButtonText: { key: "upgradeOrganization" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (upgradeConfirmed) {
|
if (upgradeConfirmed) {
|
||||||
this.router.navigate([
|
this.router.navigate([
|
||||||
@ -162,7 +162,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
title: { key: "premiumRequired" },
|
title: { key: "premiumRequired" },
|
||||||
content: { key: "premiumRequiredDesc" },
|
content: { key: "premiumRequiredDesc" },
|
||||||
acceptButtonText: { key: "upgrade" },
|
acceptButtonText: { key: "upgrade" },
|
||||||
type: SimpleDialogType.SUCCESS,
|
type: "success",
|
||||||
});
|
});
|
||||||
if (premiumConfirmed) {
|
if (premiumConfirmed) {
|
||||||
this.router.navigate(["settings/subscription/premium"]);
|
this.router.navigate(["settings/subscription/premium"]);
|
||||||
@ -174,7 +174,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
title: { key: "emailVerificationRequired" },
|
title: { key: "emailVerificationRequired" },
|
||||||
content: { key: "emailVerificationRequiredDesc" },
|
content: { key: "emailVerificationRequiredDesc" },
|
||||||
acceptButtonText: { key: "learnMore" },
|
acceptButtonText: { key: "learnMore" },
|
||||||
type: SimpleDialogType.INFO,
|
type: "info",
|
||||||
});
|
});
|
||||||
if (emailVerificationConfirmed) {
|
if (emailVerificationConfirmed) {
|
||||||
this.platformUtilsService.launchUri(
|
this.platformUtilsService.launchUri(
|
||||||
|
@ -2,7 +2,6 @@ import { Component, NgZone } from "@angular/core";
|
|||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeout.service";
|
||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||||
@ -17,6 +16,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { RouterService } from "../core";
|
import { RouterService } from "../core";
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ export class LockComponent extends BaseLockComponent {
|
|||||||
policyApiService: PolicyApiServiceAbstraction,
|
policyApiService: PolicyApiServiceAbstraction,
|
||||||
policyService: InternalPolicyService,
|
policyService: InternalPolicyService,
|
||||||
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
passwordStrengthService: PasswordStrengthServiceAbstraction,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
router,
|
router,
|
||||||
|
@ -4,7 +4,6 @@ import { Router } from "@angular/router";
|
|||||||
|
|
||||||
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
|
||||||
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -18,6 +17,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-register-form",
|
selector: "app-register-form",
|
||||||
@ -46,7 +46,7 @@ export class RegisterFormComponent extends BaseRegisterComponent {
|
|||||||
environmentService: EnvironmentService,
|
environmentService: EnvironmentService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
auditService: AuditService,
|
auditService: AuditService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
formValidationErrorService,
|
formValidationErrorService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
|
||||||
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
import { SetPasswordComponent as BaseSetPasswordComponent } from "@bitwarden/angular/components/set-password.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
@ -15,6 +14,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-set-password",
|
selector: "app-set-password",
|
||||||
@ -36,7 +36,7 @@ export class SetPasswordComponent extends BaseSetPasswordComponent {
|
|||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
organizationApiService: OrganizationApiServiceAbstraction,
|
organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
organizationUserService: OrganizationUserService,
|
organizationUserService: OrganizationUserService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
@ -11,6 +10,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "emergency-access-attachments",
|
selector: "emergency-access-attachments",
|
||||||
@ -29,7 +29,7 @@ export class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponen
|
|||||||
apiService: ApiService,
|
apiService: ApiService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angu
|
|||||||
import { takeUntil } from "rxjs";
|
import { takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { ChangePasswordComponent } from "@bitwarden/angular/auth/components/change-password.component";
|
import { ChangePasswordComponent } from "@bitwarden/angular/auth/components/change-password.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { PolicyData } from "@bitwarden/common/admin-console/models/data/policy.data";
|
import { PolicyData } from "@bitwarden/common/admin-console/models/data/policy.data";
|
||||||
@ -19,6 +18,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "emergency-access-takeover",
|
selector: "emergency-access-takeover",
|
||||||
@ -48,7 +48,7 @@ export class EmergencyAccessTakeoverComponent
|
|||||||
policyService: PolicyService,
|
policyService: PolicyService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
||||||
|
|
||||||
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
@ -19,6 +18,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { EmergencyAccessAddEditComponent } from "./emergency-access-add-edit.component";
|
import { EmergencyAccessAddEditComponent } from "./emergency-access-add-edit.component";
|
||||||
import { EmergencyAccessConfirmComponent } from "./emergency-access-confirm.component";
|
import { EmergencyAccessConfirmComponent } from "./emergency-access-confirm.component";
|
||||||
@ -56,7 +56,7 @@ export class EmergencyAccessComponent implements OnInit {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
protected dialogService: DialogServiceAbstraction
|
protected dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -174,7 +174,7 @@ export class EmergencyAccessComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: this.userNamePipe.transform(details),
|
title: this.userNamePipe.transform(details),
|
||||||
content: { key: "removeUserConfirmation" },
|
content: { key: "removeUserConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -207,7 +207,7 @@ export class EmergencyAccessComponent implements OnInit {
|
|||||||
placeholders: [details.waitTimeDays.toString()],
|
placeholders: [details.waitTimeDays.toString()],
|
||||||
},
|
},
|
||||||
acceptButtonText: { key: "requestAccess" },
|
acceptButtonText: { key: "requestAccess" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -236,7 +236,7 @@ export class EmergencyAccessComponent implements OnInit {
|
|||||||
placeholders: [this.userNamePipe.transform(details), type],
|
placeholders: [this.userNamePipe.transform(details), type],
|
||||||
},
|
},
|
||||||
acceptButtonText: { key: "approve" },
|
acceptButtonText: { key: "approve" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { TotpService } from "@bitwarden/common/abstractions/totp.service";
|
import { TotpService } from "@bitwarden/common/abstractions/totp.service";
|
||||||
@ -18,6 +17,7 @@ import { CollectionService } from "@bitwarden/common/vault/abstractions/collecti
|
|||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "../../../vault/individual-vault/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "../../../vault/individual-vault/add-edit.component";
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ export class EmergencyAddEditComponent extends BaseAddEditComponent {
|
|||||||
organizationService: OrganizationService,
|
organizationService: OrganizationService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -12,6 +11,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ export class TwoFactorAuthenticatorComponent
|
|||||||
platformUtilsService: PlatformUtilsService,
|
platformUtilsService: PlatformUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Directive, EventEmitter, Output } from "@angular/core";
|
import { Directive, EventEmitter, Output } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -11,6 +10,7 @@ import { AuthResponseBase } from "@bitwarden/common/auth/types/auth-response";
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class TwoFactorBaseComponent {
|
export abstract class TwoFactorBaseComponent {
|
||||||
@ -32,7 +32,7 @@ export abstract class TwoFactorBaseComponent {
|
|||||||
protected platformUtilsService: PlatformUtilsService,
|
protected platformUtilsService: PlatformUtilsService,
|
||||||
protected logService: LogService,
|
protected logService: LogService,
|
||||||
protected userVerificationService: UserVerificationService,
|
protected userVerificationService: UserVerificationService,
|
||||||
protected dialogService: DialogServiceAbstraction
|
protected dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
protected auth(authResponse: AuthResponseBase) {
|
protected auth(authResponse: AuthResponseBase) {
|
||||||
@ -54,7 +54,7 @@ export abstract class TwoFactorBaseComponent {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "disable" },
|
title: { key: "disable" },
|
||||||
content: { key: "twoStepDisableDesc" },
|
content: { key: "twoStepDisableDesc" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -10,6 +9,7 @@ import { AuthResponse } from "@bitwarden/common/auth/types/auth-response";
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ export class TwoFactorDuoComponent extends TwoFactorBaseComponent {
|
|||||||
platformUtilsService: PlatformUtilsService,
|
platformUtilsService: PlatformUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -12,6 +11,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, NgZone } from "@angular/core";
|
import { Component, NgZone } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -15,6 +14,7 @@ import { AuthResponse } from "@bitwarden/common/auth/types/auth-response";
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export class TwoFactorWebAuthnComponent extends TwoFactorBaseComponent {
|
|||||||
private ngZone: NgZone,
|
private ngZone: NgZone,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
@ -98,7 +98,7 @@ export class TwoFactorWebAuthnComponent extends TwoFactorBaseComponent {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: name,
|
title: name,
|
||||||
content: { key: "removeU2fConfirmation" },
|
content: { key: "removeU2fConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
@ -10,6 +9,7 @@ import { AuthResponse } from "@bitwarden/common/auth/types/auth-response";
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
import { TwoFactorBaseComponent } from "./two-factor-base.component";
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ export class TwoFactorYubiKeyComponent extends TwoFactorBaseComponent {
|
|||||||
platformUtilsService: PlatformUtilsService,
|
platformUtilsService: PlatformUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
|
@ -3,11 +3,11 @@ import { Component, Inject } from "@angular/core";
|
|||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
import { UserVerificationPromptComponent as BaseUserVerificationPrompt } from "@bitwarden/angular/auth/components/user-verification-prompt.component";
|
import { UserVerificationPromptComponent as BaseUserVerificationPrompt } from "@bitwarden/angular/auth/components/user-verification-prompt.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalConfig } from "@bitwarden/angular/services/modal.service";
|
import { ModalConfig } from "@bitwarden/angular/services/modal.service";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
export interface UserVerificationPromptParams {
|
export interface UserVerificationPromptParams {
|
||||||
confirmDescription: string;
|
confirmDescription: string;
|
||||||
@ -50,7 +50,7 @@ export class UserVerificationPromptComponent extends BaseUserVerificationPrompt
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openUserVerificationPrompt = (
|
export const openUserVerificationPrompt = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<UserVerificationPromptParams>
|
config: DialogConfig<UserVerificationPromptParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<boolean, UserVerificationPromptParams>(
|
return dialogService.open<boolean, UserVerificationPromptParams>(
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "@bitwarden/angular/auth/components/update-password.component";
|
import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "@bitwarden/angular/auth/components/update-password.component";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||||
@ -13,6 +12,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-update-password",
|
selector: "app-update-password",
|
||||||
@ -31,7 +31,7 @@ export class UpdatePasswordComponent extends BaseUpdatePasswordComponent {
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
router,
|
router,
|
||||||
|
@ -3,7 +3,6 @@ import { Component, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { concatMap, Subject, takeUntil } from "rxjs";
|
import { concatMap, Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
@ -19,6 +18,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BillingSyncApiKeyComponent,
|
BillingSyncApiKeyComponent,
|
||||||
@ -61,7 +61,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private configService: ConfigServiceAbstraction,
|
private configService: ConfigServiceAbstraction,
|
||||||
private datePipe: DatePipe
|
private datePipe: DatePipe
|
||||||
) {}
|
) {}
|
||||||
@ -279,7 +279,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "cancelSubscription" },
|
title: { key: "cancelSubscription" },
|
||||||
content: { key: "cancelConfirmation" },
|
content: { key: "cancelConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -307,7 +307,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "reinstateSubscription" },
|
title: { key: "reinstateSubscription" },
|
||||||
content: { key: "reinstateConfirmation" },
|
content: { key: "reinstateConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -379,7 +379,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
title: { key: "removeSponsorship" },
|
title: { key: "removeSponsorship" },
|
||||||
content: { key: "removeSponsorshipConfirmation" },
|
content: { key: "removeSponsorshipConfirmation" },
|
||||||
acceptButtonText: { key: "remove" },
|
acceptButtonText: { key: "remove" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild } from "@angular/core";
|
|||||||
import { FormBuilder, FormControl, Validators } from "@angular/forms";
|
import { FormBuilder, FormControl, Validators } from "@angular/forms";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
import { OrganizationResponse } from "@bitwarden/common/admin-console/models/response/organization.response";
|
import { OrganizationResponse } from "@bitwarden/common/admin-console/models/response/organization.response";
|
||||||
@ -12,6 +11,7 @@ import { VerifyBankRequest } from "@bitwarden/common/models/request/verify-bank.
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { TaxInfoComponent } from "./tax-info.component";
|
import { TaxInfoComponent } from "./tax-info.component";
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export class PaymentMethodComponent implements OnInit {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -100,7 +100,7 @@ export class PaymentMethodComponent implements OnInit {
|
|||||||
content: { key: "cannotPerformInAppPurchase" },
|
content: { key: "cannotPerformInAppPurchase" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -122,7 +122,7 @@ export class PaymentMethodComponent implements OnInit {
|
|||||||
content: { key: "cannotPerformInAppPurchase" },
|
content: { key: "cannotPerformInAppPurchase" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { SubscriptionResponse } from "@bitwarden/common/billing/models/response/subscription.response";
|
import { SubscriptionResponse } from "@bitwarden/common/billing/models/response/subscription.response";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
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 { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-user-subscription",
|
selector: "app-user-subscription",
|
||||||
@ -36,7 +36,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private fileDownloadService: FileDownloadService,
|
private fileDownloadService: FileDownloadService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private environmentService: EnvironmentService
|
private environmentService: EnvironmentService
|
||||||
) {
|
) {
|
||||||
this.selfHosted = platformUtilsService.isSelfHost();
|
this.selfHosted = platformUtilsService.isSelfHost();
|
||||||
@ -75,7 +75,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
content: { key: "manageSubscriptionFromStore" },
|
content: { key: "manageSubscriptionFromStore" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -84,7 +84,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "reinstateSubscription" },
|
title: { key: "reinstateSubscription" },
|
||||||
content: { key: "reinstateConfirmation" },
|
content: { key: "reinstateConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -112,7 +112,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
content: { key: "manageSubscriptionFromStore" },
|
content: { key: "manageSubscriptionFromStore" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -121,7 +121,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "cancelSubscription" },
|
title: { key: "cancelSubscription" },
|
||||||
content: { key: "cancelConfirmation" },
|
content: { key: "cancelConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -175,7 +175,7 @@ export class UserSubscriptionComponent implements OnInit {
|
|||||||
content: { key: "cannotPerformInAppPurchase" },
|
content: { key: "cannotPerformInAppPurchase" },
|
||||||
acceptButtonText: { key: "ok" },
|
acceptButtonText: { key: "ok" },
|
||||||
cancelButtonText: null,
|
cancelButtonText: null,
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -2,7 +2,6 @@ import { Directive, ViewChild, ViewContainerRef } from "@angular/core";
|
|||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -21,6 +20,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { OrganizationUserView } from "../admin-console/organizations/core/views/organization-user.view";
|
import { OrganizationUserView } from "../admin-console/organizations/core/views/organization-user.view";
|
||||||
import { UserConfirmComponent } from "../admin-console/organizations/manage/user-confirm.component";
|
import { UserConfirmComponent } from "../admin-console/organizations/manage/user-confirm.component";
|
||||||
@ -110,7 +110,7 @@ export abstract class BasePeopleComponent<
|
|||||||
private searchPipe: SearchPipe,
|
private searchPipe: SearchPipe,
|
||||||
protected userNamePipe: UserNamePipe,
|
protected userNamePipe: UserNamePipe,
|
||||||
protected stateService: StateService,
|
protected stateService: StateService,
|
||||||
protected dialogService: DialogServiceAbstraction
|
protected dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
abstract edit(user: UserType): void;
|
abstract edit(user: UserType): void;
|
||||||
@ -222,7 +222,7 @@ export abstract class BasePeopleComponent<
|
|||||||
return this.dialogService.openSimpleDialog({
|
return this.dialogService.openSimpleDialog({
|
||||||
title: this.userNamePipe.transform(user),
|
title: this.userNamePipe.transform(user),
|
||||||
content: { key: "removeUserConfirmation" },
|
content: { key: "removeUserConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ export abstract class BasePeopleComponent<
|
|||||||
title: { key: "revokeAccess", placeholders: [this.userNamePipe.transform(user)] },
|
title: { key: "revokeAccess", placeholders: [this.userNamePipe.transform(user)] },
|
||||||
content: this.revokeWarningMessage(),
|
content: this.revokeWarningMessage(),
|
||||||
acceptButtonText: { key: "revokeAccess" },
|
acceptButtonText: { key: "revokeAccess" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config";
|
import { KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config";
|
||||||
import {
|
import {
|
||||||
DEFAULT_KDF_CONFIG,
|
DEFAULT_KDF_CONFIG,
|
||||||
@ -11,6 +10,7 @@ import {
|
|||||||
KdfType,
|
KdfType,
|
||||||
} from "@bitwarden/common/enums";
|
} from "@bitwarden/common/enums";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.component";
|
import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.component";
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export class ChangeKdfComponent implements OnInit {
|
|||||||
kdfOptions: any[] = [];
|
kdfOptions: any[] = [];
|
||||||
recommendedPbkdf2Iterations = DEFAULT_PBKDF2_ITERATIONS;
|
recommendedPbkdf2Iterations = DEFAULT_PBKDF2_ITERATIONS;
|
||||||
|
|
||||||
constructor(private stateService: StateService, private dialogService: DialogServiceAbstraction) {
|
constructor(private stateService: StateService, private dialogService: DialogService) {
|
||||||
this.kdfOptions = [
|
this.kdfOptions = [
|
||||||
{ name: "PBKDF2 SHA-256", value: KdfType.PBKDF2_SHA256 },
|
{ name: "PBKDF2 SHA-256", value: KdfType.PBKDF2_SHA256 },
|
||||||
{ name: "Argon2id", value: KdfType.Argon2id },
|
{ name: "Argon2id", value: KdfType.Argon2id },
|
||||||
|
@ -3,7 +3,6 @@ import { Router } from "@angular/router";
|
|||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { ChangePasswordComponent as BaseChangePasswordComponent } from "@bitwarden/angular/auth/components/change-password.component";
|
import { ChangePasswordComponent as BaseChangePasswordComponent } from "@bitwarden/angular/auth/components/change-password.component";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
@ -32,6 +31,7 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
|||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { CipherWithIdRequest } from "@bitwarden/common/vault/models/request/cipher-with-id.request";
|
import { CipherWithIdRequest } from "@bitwarden/common/vault/models/request/cipher-with-id.request";
|
||||||
import { FolderWithIdRequest } from "@bitwarden/common/vault/models/request/folder-with-id.request";
|
import { FolderWithIdRequest } from "@bitwarden/common/vault/models/request/folder-with-id.request";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-change-password",
|
selector: "app-change-password",
|
||||||
@ -63,7 +63,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
@ -107,7 +107,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
content: { key: "oldAttachmentsNeedFixDesc" },
|
content: { key: "oldAttachmentsNeedFixDesc" },
|
||||||
acceptButtonText: { key: "learnMore" },
|
acceptButtonText: { key: "learnMore" },
|
||||||
cancelButtonText: { key: "close" },
|
cancelButtonText: { key: "close" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (learnMore) {
|
if (learnMore) {
|
||||||
@ -127,7 +127,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
this.i18nService.t("updateEncryptionKeyExportWarning") +
|
this.i18nService.t("updateEncryptionKeyExportWarning") +
|
||||||
" " +
|
" " +
|
||||||
this.i18nService.t("rotateEncKeyConfirmation"),
|
this.i18nService.t("rotateEncKeyConfirmation"),
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -2,7 +2,6 @@ import { Component, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
import { concatMap, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
import { concatMap, filter, map, Observable, Subject, takeUntil, tap } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction";
|
import { AbstractThemingService } from "@bitwarden/angular/services/theming/theming.service.abstraction";
|
||||||
import { SettingsService } from "@bitwarden/common/abstractions/settings.service";
|
import { SettingsService } from "@bitwarden/common/abstractions/settings.service";
|
||||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaultTimeout/vaultTimeoutSettings.service";
|
||||||
@ -15,6 +14,7 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-preferences",
|
selector: "app-preferences",
|
||||||
@ -55,7 +55,7 @@ export class PreferencesComponent implements OnInit {
|
|||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private themingService: AbstractThemingService,
|
private themingService: AbstractThemingService,
|
||||||
private settingsService: SettingsService,
|
private settingsService: SettingsService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
this.vaultTimeoutOptions = [
|
this.vaultTimeoutOptions = [
|
||||||
{ name: i18nService.t("oneMinute"), value: 1 },
|
{ name: i18nService.t("oneMinute"), value: 1 },
|
||||||
@ -117,7 +117,7 @@ export class PreferencesComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
title: { key: "vaultTimeoutLogOutConfirmationTitle" },
|
||||||
content: { key: "vaultTimeoutLogOutConfirmation" },
|
content: { key: "vaultTimeoutLogOutConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component";
|
import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
@ -9,6 +8,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password";
|
||||||
import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username";
|
import { UsernameGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/username";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { PasswordGeneratorHistoryComponent } from "./password-generator-history.component";
|
import { PasswordGeneratorHistoryComponent } from "./password-generator-history.component";
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export class GeneratorComponent extends BaseGeneratorComponent {
|
|||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
route: ActivatedRoute,
|
route: ActivatedRoute,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
passwordGenerationService,
|
passwordGenerationService,
|
||||||
|
@ -2,7 +2,6 @@ import { Component } from "@angular/core";
|
|||||||
import { UntypedFormBuilder } from "@angular/forms";
|
import { UntypedFormBuilder } from "@angular/forms";
|
||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
import { ExportComponent as BaseExportComponent } from "@bitwarden/angular/tools/export/components/export.component";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
@ -13,6 +12,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export";
|
||||||
|
|
||||||
import { openUserVerificationPrompt } from "../../auth/shared/components/user-verification";
|
import { openUserVerificationPrompt } from "../../auth/shared/components/user-verification";
|
||||||
@ -37,7 +37,7 @@ export class ExportComponent extends BaseExportComponent {
|
|||||||
userVerificationService: UserVerificationService,
|
userVerificationService: UserVerificationService,
|
||||||
formBuilder: UntypedFormBuilder,
|
formBuilder: UntypedFormBuilder,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cryptoService,
|
cryptoService,
|
||||||
|
@ -6,7 +6,6 @@ import { concat, Observable, Subject, lastValueFrom, combineLatest } from "rxjs"
|
|||||||
import { map, takeUntil } from "rxjs/operators";
|
import { map, takeUntil } from "rxjs/operators";
|
||||||
import Swal, { SweetAlertIcon } from "sweetalert2";
|
import Swal, { SweetAlertIcon } from "sweetalert2";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import {
|
import {
|
||||||
canAccessImportExport,
|
canAccessImportExport,
|
||||||
@ -24,6 +23,7 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
|||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import {
|
import {
|
||||||
ImportOption,
|
ImportOption,
|
||||||
ImportResult,
|
ImportResult,
|
||||||
@ -75,7 +75,7 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
protected modalService: ModalService,
|
protected modalService: ModalService,
|
||||||
protected syncService: SyncService,
|
protected syncService: SyncService,
|
||||||
protected dialogService: DialogServiceAbstraction,
|
protected dialogService: DialogService,
|
||||||
protected folderService: FolderService,
|
protected folderService: FolderService,
|
||||||
protected collectionService: CollectionService,
|
protected collectionService: CollectionService,
|
||||||
protected organizationService: OrganizationService,
|
protected organizationService: OrganizationService,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { DatePipe } from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/tools/send/add-edit.component";
|
||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
@ -12,6 +11,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-send-add-edit",
|
selector: "app-send-add-edit",
|
||||||
@ -31,7 +31,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
policyService: PolicyService,
|
policyService: PolicyService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
i18nService,
|
i18nService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, NgZone, ViewChild, ViewContainerRef } from "@angular/core";
|
import { Component, NgZone, ViewChild, ViewContainerRef } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
import { SendComponent as BaseSendComponent } from "@bitwarden/angular/tools/send/send.component";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -13,7 +12,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||||
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
|
||||||
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction";
|
||||||
import { NoItemsModule, SearchModule, TableDataSource } from "@bitwarden/components";
|
import { DialogService, NoItemsModule, SearchModule, TableDataSource } from "@bitwarden/components";
|
||||||
|
|
||||||
import { SharedModule } from "../../shared";
|
import { SharedModule } from "../../shared";
|
||||||
|
|
||||||
@ -56,7 +55,7 @@ export class SendComponent extends BaseSendComponent {
|
|||||||
private broadcasterService: BroadcasterService,
|
private broadcasterService: BroadcasterService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
sendService,
|
sendService,
|
||||||
|
@ -12,7 +12,6 @@ import {
|
|||||||
takeUntil,
|
takeUntil,
|
||||||
} from "rxjs";
|
} from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses";
|
import { OrganizationUserUserDetailsResponse } from "@bitwarden/common/abstractions/organization-user/responses";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
@ -22,7 +21,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
import { CollectionResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
import { CollectionResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
import { BitValidators } from "@bitwarden/components";
|
import { DialogService, BitValidators } from "@bitwarden/components";
|
||||||
|
|
||||||
import { GroupService, GroupView } from "../../../admin-console/organizations/core";
|
import { GroupService, GroupView } from "../../../admin-console/organizations/core";
|
||||||
import { PermissionMode } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.component";
|
import { PermissionMode } from "../../../admin-console/organizations/shared/components/access-selector/access-selector.component";
|
||||||
@ -95,7 +94,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;
|
this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;
|
||||||
}
|
}
|
||||||
@ -249,7 +248,7 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: this.collection?.name,
|
title: this.collection?.name,
|
||||||
content: { key: "deleteCollectionConfirmation" },
|
content: { key: "deleteCollectionConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed && this.params.collectionId) {
|
if (!confirmed && this.params.collectionId) {
|
||||||
@ -335,7 +334,7 @@ function mapToAccessSelections(collectionDetails: CollectionAdminView): AccessIt
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export function openCollectionDialog(
|
export function openCollectionDialog(
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<CollectionDialogParams>
|
config: DialogConfig<CollectionDialogParams>
|
||||||
) {
|
) {
|
||||||
return dialogService.open<CollectionDialogResult, CollectionDialogParams>(
|
return dialogService.open<CollectionDialogResult, CollectionDialogParams>(
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "@bitwarden/angular/vault/components/add-edit.component";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
@ -21,6 +20,7 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
|||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||||
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
import { LoginUriView } from "@bitwarden/common/vault/models/view/login-uri.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-add-edit",
|
selector: "app-vault-add-edit",
|
||||||
@ -59,7 +59,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
|||||||
logService: LogService,
|
logService: LogService,
|
||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "@bitwarden/angular/vault/components/attachments.component";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
@ -11,6 +10,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-vault-attachments",
|
selector: "app-vault-attachments",
|
||||||
@ -29,7 +29,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
|||||||
apiService: ApiService,
|
apiService: ApiService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||||
import { Component, Inject } from "@angular/core";
|
import { Component, Inject } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { CollectionBulkDeleteRequest } from "@bitwarden/common/models/request/collection-bulk-delete.request";
|
import { CollectionBulkDeleteRequest } from "@bitwarden/common/models/request/collection-bulk-delete.request";
|
||||||
@ -9,6 +8,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { CipherBulkDeleteRequest } from "@bitwarden/common/vault/models/request/cipher-bulk-delete.request";
|
import { CipherBulkDeleteRequest } from "@bitwarden/common/vault/models/request/cipher-bulk-delete.request";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
export interface BulkDeleteDialogParams {
|
export interface BulkDeleteDialogParams {
|
||||||
cipherIds?: string[];
|
cipherIds?: string[];
|
||||||
@ -28,7 +28,7 @@ export enum BulkDeleteDialogResult {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openBulkDeleteDialog = (
|
export const openBulkDeleteDialog = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<BulkDeleteDialogParams>
|
config: DialogConfig<BulkDeleteDialogParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<BulkDeleteDialogResult, BulkDeleteDialogParams>(
|
return dialogService.open<BulkDeleteDialogResult, BulkDeleteDialogParams>(
|
||||||
|
@ -3,12 +3,12 @@ import { Component, Inject, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder, Validators } from "@angular/forms";
|
import { FormBuilder, Validators } from "@angular/forms";
|
||||||
import { firstValueFrom, Observable } from "rxjs";
|
import { firstValueFrom, Observable } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
export interface BulkMoveDialogParams {
|
export interface BulkMoveDialogParams {
|
||||||
cipherIds?: string[];
|
cipherIds?: string[];
|
||||||
@ -25,7 +25,7 @@ export enum BulkMoveDialogResult {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openBulkMoveDialog = (
|
export const openBulkMoveDialog = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<BulkMoveDialogParams>
|
config: DialogConfig<BulkMoveDialogParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<BulkMoveDialogResult, BulkMoveDialogParams>(
|
return dialogService.open<BulkMoveDialogResult, BulkMoveDialogParams>(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
import { DialogConfig, DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
|
||||||
import { Component, Inject, OnInit } from "@angular/core";
|
import { Component, Inject, OnInit } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
@ -12,6 +11,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
export interface BulkShareDialogParams {
|
export interface BulkShareDialogParams {
|
||||||
ciphers: CipherView[];
|
ciphers: CipherView[];
|
||||||
@ -29,7 +29,7 @@ export enum BulkShareDialogResult {
|
|||||||
* @param config Configuration for the dialog
|
* @param config Configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export const openBulkShareDialog = (
|
export const openBulkShareDialog = (
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config: DialogConfig<BulkShareDialogParams>
|
config: DialogConfig<BulkShareDialogParams>
|
||||||
) => {
|
) => {
|
||||||
return dialogService.open<BulkShareDialogResult, BulkShareDialogParams>(
|
return dialogService.open<BulkShareDialogResult, BulkShareDialogParams>(
|
||||||
|
@ -2,13 +2,13 @@ import { DIALOG_DATA, DialogConfig, DialogRef } from "@angular/cdk/dialog";
|
|||||||
import { Component, Inject } from "@angular/core";
|
import { Component, Inject } from "@angular/core";
|
||||||
import { FormBuilder } from "@angular/forms";
|
import { FormBuilder } from "@angular/forms";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
import { FolderAddEditComponent as BaseFolderAddEditComponent } from "@bitwarden/angular/vault/components/folder-add-edit.component";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction";
|
||||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-folder-add-edit",
|
selector: "app-folder-add-edit",
|
||||||
@ -22,7 +22,7 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
|||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService,
|
platformUtilsService: PlatformUtilsService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
formBuilder: FormBuilder,
|
formBuilder: FormBuilder,
|
||||||
protected dialogRef: DialogRef<FolderAddEditDialogResult>,
|
protected dialogRef: DialogRef<FolderAddEditDialogResult>,
|
||||||
@Inject(DIALOG_DATA) params: FolderAddEditDialogParams
|
@Inject(DIALOG_DATA) params: FolderAddEditDialogParams
|
||||||
@ -43,7 +43,7 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "deleteFolder" },
|
title: { key: "deleteFolder" },
|
||||||
content: { key: "deleteFolderConfirmation" },
|
content: { key: "deleteFolderConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -103,7 +103,7 @@ export enum FolderAddEditDialogResult {
|
|||||||
* @param config Optional configuration for the dialog
|
* @param config Optional configuration for the dialog
|
||||||
*/
|
*/
|
||||||
export function openFolderAddEditDialog(
|
export function openFolderAddEditDialog(
|
||||||
dialogService: DialogServiceAbstraction,
|
dialogService: DialogService,
|
||||||
config?: DialogConfig<FolderAddEditDialogParams>
|
config?: DialogConfig<FolderAddEditDialogParams>
|
||||||
) {
|
) {
|
||||||
return dialogService.open<FolderAddEditDialogResult, FolderAddEditDialogParams>(
|
return dialogService.open<FolderAddEditDialogResult, FolderAddEditDialogParams>(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
import { Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
||||||
import { map, Subject, takeUntil } from "rxjs";
|
import { map, Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
import { OrganizationUserService } from "@bitwarden/common/abstractions/organization-user/organization-user.service";
|
||||||
@ -15,6 +14,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { EnrollMasterPasswordReset } from "../../../../admin-console/organizations/users/enroll-master-password-reset.component";
|
import { EnrollMasterPasswordReset } from "../../../../admin-console/organizations/users/enroll-master-password-reset.component";
|
||||||
import { OptionsInput } from "../shared/components/vault-filter-section.component";
|
import { OptionsInput } from "../shared/components/vault-filter-section.component";
|
||||||
@ -42,7 +42,7 @@ export class OrganizationOptionsComponent implements OnInit, OnDestroy {
|
|||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private organizationUserService: OrganizationUserService,
|
private organizationUserService: OrganizationUserService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -85,7 +85,7 @@ export class OrganizationOptionsComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: org.name,
|
title: org.name,
|
||||||
content: { key: "unlinkSsoConfirmation" },
|
content: { key: "unlinkSsoConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -107,7 +107,7 @@ export class OrganizationOptionsComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: org.name,
|
title: org.name,
|
||||||
content: { key: "leaveOrganizationConfirmation" },
|
content: { key: "leaveOrganizationConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -29,7 +29,6 @@ import {
|
|||||||
} from "rxjs/operators";
|
} from "rxjs/operators";
|
||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -58,7 +57,7 @@ import { CollectionData } from "@bitwarden/common/vault/models/data/collection.d
|
|||||||
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
import { Icons } from "@bitwarden/components";
|
import { DialogService, Icons } from "@bitwarden/components";
|
||||||
|
|
||||||
import { UpdateKeyComponent } from "../../settings/update-key.component";
|
import { UpdateKeyComponent } from "../../settings/update-key.component";
|
||||||
import { CollectionDialogAction, openCollectionDialog } from "../components/collection-dialog";
|
import { CollectionDialogAction, openCollectionDialog } from "../components/collection-dialog";
|
||||||
@ -153,7 +152,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
private changeDetectorRef: ChangeDetectorRef,
|
private changeDetectorRef: ChangeDetectorRef,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private tokenService: TokenService,
|
private tokenService: TokenService,
|
||||||
private cryptoService: CryptoService,
|
private cryptoService: CryptoService,
|
||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
@ -718,7 +717,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: permanent ? "permanentlyDeleteItem" : "deleteItem" },
|
title: { key: permanent ? "permanentlyDeleteItem" : "deleteItem" },
|
||||||
content: { key: permanent ? "permanentlyDeleteItemConfirmation" : "deleteItemConfirmation" },
|
content: { key: permanent ? "permanentlyDeleteItemConfirmation" : "deleteItemConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
@ -20,6 +19,7 @@ import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folde
|
|||||||
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
import { PasswordRepromptService } from "@bitwarden/common/vault/abstractions/password-reprompt.service";
|
||||||
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { AddEditComponent as BaseAddEditComponent } from "../individual-vault/add-edit.component";
|
import { AddEditComponent as BaseAddEditComponent } from "../individual-vault/add-edit.component";
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
passwordRepromptService: PasswordRepromptService,
|
passwordRepromptService: PasswordRepromptService,
|
||||||
organizationService: OrganizationService,
|
organizationService: OrganizationService,
|
||||||
sendApiService: SendApiService,
|
sendApiService: SendApiService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
@ -13,6 +12,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
|||||||
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
import { CipherData } from "@bitwarden/common/vault/models/data/cipher.data";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
import { AttachmentView } from "@bitwarden/common/vault/models/view/attachment.view";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { AttachmentsComponent as BaseAttachmentsComponent } from "../individual-vault/attachments.component";
|
import { AttachmentsComponent as BaseAttachmentsComponent } from "../individual-vault/attachments.component";
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
|
|||||||
apiService: ApiService,
|
apiService: ApiService,
|
||||||
logService: LogService,
|
logService: LogService,
|
||||||
fileDownloadService: FileDownloadService,
|
fileDownloadService: FileDownloadService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
cipherService,
|
cipherService,
|
||||||
|
@ -2,17 +2,12 @@ import { Component, EventEmitter, Input, Output } from "@angular/core";
|
|||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import {
|
|
||||||
SimpleDialogType,
|
|
||||||
DialogServiceAbstraction,
|
|
||||||
SimpleDialogCloseType,
|
|
||||||
SimpleDialogOptions,
|
|
||||||
} from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { ProductType } from "@bitwarden/common/enums";
|
import { ProductType } from "@bitwarden/common/enums";
|
||||||
import { TreeNode } from "@bitwarden/common/models/domain/tree-node";
|
import { TreeNode } from "@bitwarden/common/models/domain/tree-node";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
import { DialogService, SimpleDialogOptions } from "@bitwarden/components";
|
||||||
|
|
||||||
import { CollectionAdminView } from "../../../vault/core/views/collection-admin.view";
|
import { CollectionAdminView } from "../../../vault/core/views/collection-admin.view";
|
||||||
import { CollectionDialogTabType } from "../../components/collection-dialog";
|
import { CollectionDialogTabType } from "../../components/collection-dialog";
|
||||||
@ -64,7 +59,7 @@ export class VaultHeaderComponent {
|
|||||||
constructor(
|
constructor(
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private collectionAdminService: CollectionAdminService,
|
private collectionAdminService: CollectionAdminService,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {}
|
) {}
|
||||||
@ -114,7 +109,7 @@ export class VaultHeaderComponent {
|
|||||||
: "freeOrgMaxCollectionReachedNoManageBilling",
|
: "freeOrgMaxCollectionReachedNoManageBilling",
|
||||||
this.organization.maxCollections
|
this.organization.maxCollections
|
||||||
),
|
),
|
||||||
type: SimpleDialogType.PRIMARY,
|
type: "primary",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.organization.canEditSubscription) {
|
if (this.organization.canEditSubscription) {
|
||||||
@ -126,12 +121,12 @@ export class VaultHeaderComponent {
|
|||||||
|
|
||||||
const simpleDialog = this.dialogService.openSimpleDialogRef(orgUpgradeSimpleDialogOpts);
|
const simpleDialog = this.dialogService.openSimpleDialogRef(orgUpgradeSimpleDialogOpts);
|
||||||
|
|
||||||
firstValueFrom(simpleDialog.closed).then((result: SimpleDialogCloseType | undefined) => {
|
firstValueFrom(simpleDialog.closed).then((result: boolean | undefined) => {
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == SimpleDialogCloseType.ACCEPT && this.organization.canEditSubscription) {
|
if (result && this.organization.canEditSubscription) {
|
||||||
this.router.navigate(["/organizations", this.organization.id, "billing", "subscription"], {
|
this.router.navigate(["/organizations", this.organization.id, "billing", "subscription"], {
|
||||||
queryParams: { upgrade: true },
|
queryParams: { upgrade: true },
|
||||||
});
|
});
|
||||||
|
@ -30,7 +30,6 @@ import {
|
|||||||
} from "rxjs/operators";
|
} from "rxjs/operators";
|
||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
|
||||||
@ -53,7 +52,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv
|
|||||||
import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type";
|
import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type";
|
||||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||||
import { Icons } from "@bitwarden/components";
|
import { DialogService, Icons } from "@bitwarden/components";
|
||||||
|
|
||||||
import { GroupService, GroupView } from "../../admin-console/organizations/core";
|
import { GroupService, GroupView } from "../../admin-console/organizations/core";
|
||||||
import { openEntityEventsDialog } from "../../admin-console/organizations/manage/entity-events.component";
|
import { openEntityEventsDialog } from "../../admin-console/organizations/manage/entity-events.component";
|
||||||
@ -139,7 +138,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
private syncService: SyncService,
|
private syncService: SyncService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private broadcasterService: BroadcasterService,
|
private broadcasterService: BroadcasterService,
|
||||||
private ngZone: NgZone,
|
private ngZone: NgZone,
|
||||||
@ -705,7 +704,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: permanent ? "permanentlyDeleteItem" : "deleteItem" },
|
title: { key: permanent ? "permanentlyDeleteItem" : "deleteItem" },
|
||||||
content: { key: permanent ? "permanentlyDeleteItemConfirmation" : "deleteItemConfirmation" },
|
content: { key: permanent ? "permanentlyDeleteItemConfirmation" : "deleteItemConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
@ -740,7 +739,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: collection.name,
|
title: collection.name,
|
||||||
content: { key: "deleteCollectionConfirmation" },
|
content: { key: "deleteCollectionConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -3,7 +3,6 @@ import { Component, Inject, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from "@angular/forms";
|
import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from "@angular/forms";
|
||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction";
|
import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction";
|
||||||
import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction";
|
import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction";
|
||||||
import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response";
|
import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response";
|
||||||
@ -15,6 +14,7 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
import { OrganizationDomainRequest } from "@bitwarden/common/services/organization-domain/requests/organization-domain.request";
|
import { OrganizationDomainRequest } from "@bitwarden/common/services/organization-domain/requests/organization-domain.request";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { domainNameValidator } from "./validators/domain-name.validator";
|
import { domainNameValidator } from "./validators/domain-name.validator";
|
||||||
import { uniqueInArrayValidator } from "./validators/unique-in-array.validator";
|
import { uniqueInArrayValidator } from "./validators/unique-in-array.validator";
|
||||||
@ -66,7 +66,7 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
private orgDomainApiService: OrgDomainApiServiceAbstraction,
|
private orgDomainApiService: OrgDomainApiServiceAbstraction,
|
||||||
private orgDomainService: OrgDomainServiceAbstraction,
|
private orgDomainService: OrgDomainServiceAbstraction,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
// Angular Method Implementations
|
// Angular Method Implementations
|
||||||
@ -253,7 +253,7 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "removeDomain" },
|
title: { key: "removeDomain" },
|
||||||
content: { key: "removeDomainWarning" },
|
content: { key: "removeDomainWarning" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -2,7 +2,6 @@ import { Component, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { ActivatedRoute, Params } from "@angular/router";
|
import { ActivatedRoute, Params } from "@angular/router";
|
||||||
import { concatMap, Observable, Subject, take, takeUntil } from "rxjs";
|
import { concatMap, Observable, Subject, take, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction";
|
import { OrgDomainApiServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain-api.service.abstraction";
|
||||||
import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction";
|
import { OrgDomainServiceAbstraction } from "@bitwarden/common/abstractions/organization-domain/org-domain.service.abstraction";
|
||||||
import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response";
|
import { OrganizationDomainResponse } from "@bitwarden/common/abstractions/organization-domain/responses/organization-domain.response";
|
||||||
@ -11,6 +10,7 @@ import { ErrorResponse } from "@bitwarden/common/models/response/error.response"
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DomainAddEditDialogComponent,
|
DomainAddEditDialogComponent,
|
||||||
@ -35,7 +35,7 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private orgDomainApiService: OrgDomainApiServiceAbstraction,
|
private orgDomainApiService: OrgDomainApiServiceAbstraction,
|
||||||
private orgDomainService: OrgDomainServiceAbstraction,
|
private orgDomainService: OrgDomainServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private validationService: ValidationService
|
private validationService: ValidationService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "removeDomain" },
|
title: { key: "removeDomain" },
|
||||||
content: { key: "removeDomainWarning" },
|
content: { key: "removeDomainWarning" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -2,7 +2,6 @@ import { Component, OnInit } from "@angular/core";
|
|||||||
import { UntypedFormBuilder, FormControl } from "@angular/forms";
|
import { UntypedFormBuilder, FormControl } from "@angular/forms";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
import {
|
import {
|
||||||
@ -18,6 +17,7 @@ import { ApiKeyResponse } from "@bitwarden/common/auth/models/response/api-key.r
|
|||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-org-manage-scim",
|
selector: "app-org-manage-scim",
|
||||||
@ -47,7 +47,7 @@ export class ScimComponent implements OnInit {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private environmentService: EnvironmentService,
|
private environmentService: EnvironmentService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -90,7 +90,7 @@ export class ScimComponent implements OnInit {
|
|||||||
title: { key: "rotateScimKey" },
|
title: { key: "rotateScimKey" },
|
||||||
content: { key: "rotateScimKeyWarning" },
|
content: { key: "rotateScimKeyWarning" },
|
||||||
acceptButtonText: { key: "rotateKey" },
|
acceptButtonText: { key: "rotateKey" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service";
|
import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service";
|
||||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||||
import { Provider } from "@bitwarden/common/models/domain/provider";
|
import { Provider } from "@bitwarden/common/models/domain/provider";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { WebProviderService } from "../services/web-provider.service";
|
import { WebProviderService } from "../services/web-provider.service";
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ export class AddOrganizationComponent implements OnInit {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -57,7 +57,7 @@ export class AddOrganizationComponent implements OnInit {
|
|||||||
key: "addOrganizationConfirmation",
|
key: "addOrganizationConfirmation",
|
||||||
placeholders: [organization.name, this.provider.name],
|
placeholders: [organization.name, this.provider.name],
|
||||||
},
|
},
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild, ViewContainerRef } from "@angular/core";
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { first } from "rxjs/operators";
|
import { first } from "rxjs/operators";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -17,6 +16,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
|||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { WebProviderService } from "../services/web-provider.service";
|
import { WebProviderService } from "../services/web-provider.service";
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ export class ClientsComponent implements OnInit {
|
|||||||
private modalService: ModalService,
|
private modalService: ModalService,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -158,7 +158,7 @@ export class ClientsComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: organization.organizationName,
|
title: organization.organizationName,
|
||||||
content: { key: "detachOrganizationConfirmation" },
|
content: { key: "detachOrganizationConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -4,7 +4,6 @@ import { first } from "rxjs/operators";
|
|||||||
|
|
||||||
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
import { SearchPipe } from "@bitwarden/angular/pipes/search.pipe";
|
||||||
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
import { UserNamePipe } from "@bitwarden/angular/pipes/user-name.pipe";
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
import { ModalService } from "@bitwarden/angular/services/modal.service";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||||
@ -21,6 +20,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { openEntityEventsDialog } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component";
|
import { openEntityEventsDialog } from "@bitwarden/web-vault/app/admin-console/organizations/manage/entity-events.component";
|
||||||
import { BulkStatusComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component";
|
import { BulkStatusComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-status.component";
|
||||||
import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component";
|
import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component";
|
||||||
@ -68,7 +68,7 @@ export class PeopleComponent
|
|||||||
userNamePipe: UserNamePipe,
|
userNamePipe: UserNamePipe,
|
||||||
stateService: StateService,
|
stateService: StateService,
|
||||||
private providerService: ProviderService,
|
private providerService: ProviderService,
|
||||||
dialogService: DialogServiceAbstraction
|
dialogService: DialogService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
apiService,
|
apiService,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
|
||||||
|
|
||||||
import { DialogServiceAbstraction, SimpleDialogType } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { ProviderUserType } from "@bitwarden/common/admin-console/enums";
|
import { ProviderUserType } from "@bitwarden/common/admin-console/enums";
|
||||||
import { PermissionsApi } from "@bitwarden/common/admin-console/models/api/permissions.api";
|
import { PermissionsApi } from "@bitwarden/common/admin-console/models/api/permissions.api";
|
||||||
@ -9,6 +8,7 @@ import { ProviderUserUpdateRequest } from "@bitwarden/common/admin-console/model
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "provider-user-add-edit",
|
selector: "provider-user-add-edit",
|
||||||
@ -38,7 +38,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private logService: LogService,
|
private logService: LogService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
@ -96,7 +96,7 @@ export class UserAddEditComponent implements OnInit {
|
|||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: this.name,
|
title: this.name,
|
||||||
content: { key: "removeUserConfirmation" },
|
content: { key: "removeUserConfirmation" },
|
||||||
type: SimpleDialogType.WARNING,
|
type: "warning",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
|
@ -13,11 +13,11 @@ import {
|
|||||||
share,
|
share,
|
||||||
} from "rxjs";
|
} from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ProjectListView } from "../models/view/project-list.view";
|
import { ProjectListView } from "../models/view/project-list.view";
|
||||||
import { SecretListView } from "../models/view/secret-list.view";
|
import { SecretListView } from "../models/view/secret-list.view";
|
||||||
@ -84,7 +84,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
|||||||
private projectService: ProjectService,
|
private projectService: ProjectService,
|
||||||
private secretService: SecretService,
|
private secretService: SecretService,
|
||||||
private serviceAccountService: ServiceAccountService,
|
private serviceAccountService: ServiceAccountService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
|
@ -8,9 +8,9 @@ import {
|
|||||||
AbstractControl,
|
AbstractControl,
|
||||||
} from "@angular/forms";
|
} from "@angular/forms";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ProjectListView } from "../../models/view/project-list.view";
|
import { ProjectListView } from "../../models/view/project-list.view";
|
||||||
import {
|
import {
|
||||||
@ -38,7 +38,7 @@ export class ProjectDeleteDialogComponent implements OnInit {
|
|||||||
private projectService: ProjectService,
|
private projectService: ProjectService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -2,9 +2,8 @@ import { Component, OnDestroy, OnInit } from "@angular/core";
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { map, Observable, share, startWith, Subject, switchMap, takeUntil } from "rxjs";
|
import { map, Observable, share, startWith, Subject, switchMap, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||||
import { SelectItemView } from "@bitwarden/components";
|
import { DialogService, SelectItemView } from "@bitwarden/components";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
GroupProjectAccessPolicyView,
|
GroupProjectAccessPolicyView,
|
||||||
@ -144,7 +143,7 @@ export class ProjectPeopleComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
private accessPolicyService: AccessPolicyService
|
private accessPolicyService: AccessPolicyService
|
||||||
) {}
|
) {}
|
||||||
|
@ -2,9 +2,9 @@ import { Component } from "@angular/core";
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { combineLatest, combineLatestWith, filter, Observable, startWith, switchMap } from "rxjs";
|
import { combineLatest, combineLatestWith, filter, Observable, startWith, switchMap } from "rxjs";
|
||||||
|
|
||||||
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
|
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
import { DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
import { ProjectView } from "../../models/view/project.view";
|
import { ProjectView } from "../../models/view/project.view";
|
||||||
import { SecretListView } from "../../models/view/secret-list.view";
|
import { SecretListView } from "../../models/view/secret-list.view";
|
||||||
@ -36,7 +36,7 @@ export class ProjectSecretsComponent {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private projectService: ProjectService,
|
private projectService: ProjectService,
|
||||||
private secretService: SecretService,
|
private secretService: SecretService,
|
||||||
private dialogService: DialogServiceAbstraction,
|
private dialogService: DialogService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
private i18nService: I18nService
|
private i18nService: I18nService
|
||||||
) {}
|
) {}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user