mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-21816] Removed unused header component (#16452)
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
<header [ngClass]="{ 'no-theme': noTheme }">
|
|
||||||
<div class="header-content">
|
|
||||||
<ng-content select=".sr-only"></ng-content>
|
|
||||||
<ng-content select=".left"></ng-content>
|
|
||||||
<ng-content select=".center"></ng-content>
|
|
||||||
<div class="right">
|
|
||||||
<ng-content select=".right"></ng-content>
|
|
||||||
<ng-container *ngIf="(authedAccounts$ | async) && !hideAccountSwitcher">
|
|
||||||
<app-current-account></app-current-account>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
|
||||||
import { Component, Input } from "@angular/core";
|
|
||||||
import { Observable, map, of, switchMap } from "rxjs";
|
|
||||||
|
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
|
||||||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
|
||||||
|
|
||||||
import { CurrentAccountComponent } from "../../auth/popup/account-switching/current-account.component";
|
|
||||||
import { enableAccountSwitching } from "../flags";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: "app-header",
|
|
||||||
templateUrl: "header.component.html",
|
|
||||||
imports: [CommonModule, CurrentAccountComponent],
|
|
||||||
})
|
|
||||||
export class HeaderComponent {
|
|
||||||
@Input() noTheme = false;
|
|
||||||
@Input() hideAccountSwitcher = false;
|
|
||||||
authedAccounts$: Observable<boolean>;
|
|
||||||
constructor(authService: AuthService) {
|
|
||||||
this.authedAccounts$ = authService.authStatuses$.pipe(
|
|
||||||
map((record) => Object.values(record)),
|
|
||||||
switchMap((statuses) => {
|
|
||||||
if (!enableAccountSwitching()) {
|
|
||||||
return of(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return of(statuses.some((status) => status !== AuthenticationStatus.LoggedOut));
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -30,7 +30,6 @@ import { AutofillComponent } from "../autofill/popup/settings/autofill.component
|
|||||||
import { NotificationsSettingsComponent } from "../autofill/popup/settings/notifications.component";
|
import { NotificationsSettingsComponent } from "../autofill/popup/settings/notifications.component";
|
||||||
import { RemovePasswordComponent } from "../key-management/key-connector/remove-password.component";
|
import { RemovePasswordComponent } from "../key-management/key-connector/remove-password.component";
|
||||||
import { PopOutComponent } from "../platform/popup/components/pop-out.component";
|
import { PopOutComponent } from "../platform/popup/components/pop-out.component";
|
||||||
import { HeaderComponent } from "../platform/popup/header.component";
|
|
||||||
import { PopupFooterComponent } from "../platform/popup/layout/popup-footer.component";
|
import { PopupFooterComponent } from "../platform/popup/layout/popup-footer.component";
|
||||||
import { PopupHeaderComponent } from "../platform/popup/layout/popup-header.component";
|
import { PopupHeaderComponent } from "../platform/popup/layout/popup-header.component";
|
||||||
import { PopupPageComponent } from "../platform/popup/layout/popup-page.component";
|
import { PopupPageComponent } from "../platform/popup/layout/popup-page.component";
|
||||||
@@ -80,7 +79,6 @@ import "../platform/popup/locales";
|
|||||||
PopupTabNavigationComponent,
|
PopupTabNavigationComponent,
|
||||||
PopupFooterComponent,
|
PopupFooterComponent,
|
||||||
PopupHeaderComponent,
|
PopupHeaderComponent,
|
||||||
HeaderComponent,
|
|
||||||
UserVerificationDialogComponent,
|
UserVerificationDialogComponent,
|
||||||
CurrentAccountComponent,
|
CurrentAccountComponent,
|
||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
|
|||||||
Reference in New Issue
Block a user