mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Use account service for getting account profile data. (#9133)
* Use account service for getting account profile data. * desktop build fixes * CLI build fixes * Remove state service methods
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, Input, OnInit } from "@angular/core";
|
||||
import { firstValueFrom, map } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { CalloutModule } from "@bitwarden/components";
|
||||
|
||||
@Component({
|
||||
@@ -35,7 +36,7 @@ export class ExportScopeCalloutComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
protected organizationService: OrganizationService,
|
||||
protected stateService: StateService,
|
||||
protected accountService: AccountService,
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
@@ -58,7 +59,9 @@ export class ExportScopeCalloutComponent implements OnInit {
|
||||
: {
|
||||
title: "exportingPersonalVaultTitle",
|
||||
description: "exportingIndividualVaultDescription",
|
||||
scopeIdentifier: await this.stateService.getEmail(),
|
||||
scopeIdentifier: await firstValueFrom(
|
||||
this.accountService.activeAccount$.pipe(map((a) => a?.email)),
|
||||
),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user