Make app-current-account a standalone component (#9215)

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith 2024-05-17 13:07:00 +02:00 committed by GitHub
parent ee690cd1ef
commit 9db2495de3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -1,13 +1,15 @@
import { Location } from "@angular/common";
import { CommonModule, Location } from "@angular/common";
import { Component } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { Observable, combineLatest, switchMap } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { AvatarService } from "@bitwarden/common/auth/abstractions/avatar.service";
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
import { UserId } from "@bitwarden/common/types/guid";
import { AvatarModule } from "@bitwarden/components";
export type CurrentAccount = {
id: UserId;
@ -20,6 +22,8 @@ export type CurrentAccount = {
@Component({
selector: "app-current-account",
templateUrl: "current-account.component.html",
standalone: true,
imports: [CommonModule, JslibModule, AvatarModule],
})
export class CurrentAccountComponent {
currentAccount$: Observable<CurrentAccount>;

View File

@ -126,6 +126,7 @@ import "../platform/popup/locales";
PopupHeaderComponent,
UserVerificationDialogComponent,
PopupSectionHeaderComponent,
CurrentAccountComponent,
],
declarations: [
ActionButtonsComponent,
@ -188,7 +189,6 @@ import "../platform/popup/locales";
HelpAndFeedbackComponent,
AutofillComponent,
EnvironmentSelectorComponent,
CurrentAccountComponent,
AccountSwitcherComponent,
VaultV2Component,
],