mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-328] Move exporter to tools (#5070)
* Create and register new libs/exporter Create package.json Create tsconfig Create jest.config Extend shared and root tsconfig and jest.configs Register with eslint * Migrate exportService to libs/exporter Move exportService (abstraction and impl) into libs/exporter Refactored exportService to be split into vault-export and event-export Created barrel-files for both exports Moved export.service.spec.ts into vault-export Created an export-helper, which helps build the filename (extract method refactor from ExportService) * Move components in libs/angular into tools-subfolder Moved components Updated imports in jslib-services.module and jslib.module * Register libs/exporter with browser and fix imports Move export.component into tools-subfolder * Register libs/exporter with cli and fix imports Move export.command into tools-subfolder * Register libs/exporter with desktop and fix imports Move export.component into tools-subfolder * Move export models to libs/exporter * Update web imports * Update package-lock.json * Move export models back as it would create circular dependency Reponse models in common rely on export models which are in libs/exporter, which relies on common * Fix up web for event-export * Update CODEOWNERS * Add export-models to team-tools-dev * Simplify domain import * Moving EventExport into web
This commit is contained in:
committed by
GitHub
parent
830af7b06d
commit
192bb5a7b3
@@ -0,0 +1,43 @@
|
||||
import { Component, Input, OnInit } from "@angular/core";
|
||||
|
||||
import { StateService } from "@bitwarden/common/abstractions/state.service";
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
|
||||
@Component({
|
||||
selector: "app-export-scope-callout",
|
||||
templateUrl: "export-scope-callout.component.html",
|
||||
})
|
||||
export class ExportScopeCalloutComponent implements OnInit {
|
||||
@Input() organizationId: string = null;
|
||||
|
||||
show = false;
|
||||
scopeConfig: {
|
||||
title: string;
|
||||
description: string;
|
||||
scopeIdentifier: string;
|
||||
};
|
||||
|
||||
constructor(
|
||||
protected organizationService: OrganizationService,
|
||||
protected stateService: StateService
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
if (!this.organizationService.hasOrganizations()) {
|
||||
return;
|
||||
}
|
||||
this.scopeConfig =
|
||||
this.organizationId != null
|
||||
? {
|
||||
title: "exportingOrganizationVaultTitle",
|
||||
description: "exportingOrganizationVaultDescription",
|
||||
scopeIdentifier: this.organizationService.get(this.organizationId).name,
|
||||
}
|
||||
: {
|
||||
title: "exportingPersonalVaultTitle",
|
||||
description: "exportingPersonalVaultDescription",
|
||||
scopeIdentifier: await this.stateService.getEmail(),
|
||||
};
|
||||
this.show = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user