mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
Make app-current-account a standalone component (#9215)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
ee690cd1ef
commit
9db2495de3
@ -1,13 +1,15 @@
|
|||||||
import { Location } from "@angular/common";
|
import { CommonModule, Location } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { Observable, combineLatest, switchMap } from "rxjs";
|
import { Observable, combineLatest, switchMap } from "rxjs";
|
||||||
|
|
||||||
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { AvatarService } from "@bitwarden/common/auth/abstractions/avatar.service";
|
import { AvatarService } from "@bitwarden/common/auth/abstractions/avatar.service";
|
||||||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||||
import { UserId } from "@bitwarden/common/types/guid";
|
import { UserId } from "@bitwarden/common/types/guid";
|
||||||
|
import { AvatarModule } from "@bitwarden/components";
|
||||||
|
|
||||||
export type CurrentAccount = {
|
export type CurrentAccount = {
|
||||||
id: UserId;
|
id: UserId;
|
||||||
@ -20,6 +22,8 @@ export type CurrentAccount = {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: "app-current-account",
|
selector: "app-current-account",
|
||||||
templateUrl: "current-account.component.html",
|
templateUrl: "current-account.component.html",
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, JslibModule, AvatarModule],
|
||||||
})
|
})
|
||||||
export class CurrentAccountComponent {
|
export class CurrentAccountComponent {
|
||||||
currentAccount$: Observable<CurrentAccount>;
|
currentAccount$: Observable<CurrentAccount>;
|
||||||
|
@ -126,6 +126,7 @@ import "../platform/popup/locales";
|
|||||||
PopupHeaderComponent,
|
PopupHeaderComponent,
|
||||||
UserVerificationDialogComponent,
|
UserVerificationDialogComponent,
|
||||||
PopupSectionHeaderComponent,
|
PopupSectionHeaderComponent,
|
||||||
|
CurrentAccountComponent,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ActionButtonsComponent,
|
ActionButtonsComponent,
|
||||||
@ -188,7 +189,6 @@ import "../platform/popup/locales";
|
|||||||
HelpAndFeedbackComponent,
|
HelpAndFeedbackComponent,
|
||||||
AutofillComponent,
|
AutofillComponent,
|
||||||
EnvironmentSelectorComponent,
|
EnvironmentSelectorComponent,
|
||||||
CurrentAccountComponent,
|
|
||||||
AccountSwitcherComponent,
|
AccountSwitcherComponent,
|
||||||
VaultV2Component,
|
VaultV2Component,
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user