mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
[PM-10741] Refactor biometrics interface & add dynamic status (#10973)
This commit is contained in:
@@ -17,6 +17,8 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv
|
||||
import { CommandDefinition, MessageListener } from "@bitwarden/common/platform/messaging";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
|
||||
import { DesktopBiometricsService } from "../../key-management/biometrics/desktop.biometrics.service";
|
||||
|
||||
type ActiveAccount = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -90,6 +92,7 @@ export class AccountSwitcherComponent implements OnInit {
|
||||
private environmentService: EnvironmentService,
|
||||
private loginEmailService: LoginEmailServiceAbstraction,
|
||||
private accountService: AccountService,
|
||||
private biometricsService: DesktopBiometricsService,
|
||||
) {
|
||||
this.activeAccount$ = this.accountService.activeAccount$.pipe(
|
||||
switchMap(async (active) => {
|
||||
@@ -181,6 +184,7 @@ export class AccountSwitcherComponent implements OnInit {
|
||||
|
||||
async switch(userId: string) {
|
||||
this.close();
|
||||
await this.biometricsService.setShouldAutopromptNow(true);
|
||||
|
||||
this.disabled = true;
|
||||
const accountSwitchFinishedPromise = firstValueFrom(
|
||||
|
||||
Reference in New Issue
Block a user