mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
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;
|
|
}
|
|
}
|