1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-24 04:04:24 +00:00

Add lang attr on desktop and browser (#14691)

This commit is contained in:
Justin Baur
2025-06-09 06:54:00 -04:00
committed by GitHub
parent 685f7a0fd8
commit b1f090e054
8 changed files with 102 additions and 9 deletions

View File

@@ -1,11 +1,20 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { ChangeDetectorRef, Component, NgZone, OnDestroy, OnInit, inject } from "@angular/core";
import {
ChangeDetectorRef,
Component,
DestroyRef,
NgZone,
OnDestroy,
OnInit,
inject,
} from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { NavigationEnd, Router, RouterOutlet } from "@angular/router";
import { Subject, takeUntil, firstValueFrom, concatMap, filter, tap } from "rxjs";
import { DeviceTrustToastService } from "@bitwarden/angular/auth/services/device-trust-toast.service.abstraction";
import { DocumentLangSetter } from "@bitwarden/angular/platform/i18n";
import { LogoutReason } from "@bitwarden/auth/common";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
@@ -73,9 +82,14 @@ export class AppComponent implements OnInit, OnDestroy {
private biometricStateService: BiometricStateService,
private biometricsService: BiometricsService,
private deviceTrustToastService: DeviceTrustToastService,
private readonly destoryRef: DestroyRef,
private readonly documentLangSetter: DocumentLangSetter,
private popupSizeService: PopupSizeService,
) {
this.deviceTrustToastService.setupListeners$.pipe(takeUntilDestroyed()).subscribe();
const langSubscription = this.documentLangSetter.start();
this.destoryRef.onDestroy(() => langSubscription.unsubscribe());
}
async ngOnInit() {