From 9db2495de35a474bb061c3fa4eb2ad96e8f35922 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Fri, 17 May 2024 13:07:00 +0200 Subject: [PATCH] Make app-current-account a standalone component (#9215) Co-authored-by: Daniel James Smith --- .../popup/account-switching/current-account.component.ts | 6 +++++- apps/browser/src/popup/app.module.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/auth/popup/account-switching/current-account.component.ts b/apps/browser/src/auth/popup/account-switching/current-account.component.ts index 643c37b9aa..fcb772f024 100644 --- a/apps/browser/src/auth/popup/account-switching/current-account.component.ts +++ b/apps/browser/src/auth/popup/account-switching/current-account.component.ts @@ -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; diff --git a/apps/browser/src/popup/app.module.ts b/apps/browser/src/popup/app.module.ts index 74e24433b2..2f69d8253f 100644 --- a/apps/browser/src/popup/app.module.ts +++ b/apps/browser/src/popup/app.module.ts @@ -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, ],