mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
* Add password history to json exports Change callout to not mention missing password history any longer * Added item meta dates to json exports Added vault items creation-/revision-/deleted-dates to json exports * Removed unnecessary promises * Add bitwarden-json-export types Define types Use types in vault-export-service Move existing password-protected type to export-types * Use bitwarden-json-export types in bitwarden-json-importer * Clean up passwordHistory if needed * Define and use bitwarden-csv-export-types
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import { Component, Input, OnInit } from "@angular/core";
|
|
|
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
|
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
|
|
|
@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: "exportingOrganizationVaultDesc",
|
|
scopeIdentifier: this.organizationService.get(this.organizationId).name,
|
|
}
|
|
: {
|
|
title: "exportingPersonalVaultTitle",
|
|
description: "exportingIndividualVaultDescription",
|
|
scopeIdentifier: await this.stateService.getEmail(),
|
|
};
|
|
this.show = true;
|
|
}
|
|
}
|