1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

cleanup for biometrics (#489)

This commit is contained in:
Kyle Spearrin
2020-07-23 17:24:35 -04:00
committed by GitHub
parent 60030f0354
commit 48aaf4b920
5 changed files with 41 additions and 18 deletions

View File

@@ -1,5 +1,8 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import {
ActivatedRoute,
Router,
} from '@angular/router';
import { ApiService } from 'jslib/abstractions/api.service';
import { CryptoService } from 'jslib/abstractions/crypto.service';
@@ -23,8 +26,18 @@ export class LockComponent extends BaseLockComponent {
platformUtilsService: PlatformUtilsService, messagingService: MessagingService,
userService: UserService, cryptoService: CryptoService,
storageService: StorageService, vaultTimeoutService: VaultTimeoutService,
environmentService: EnvironmentService, stateService: StateService, apiService: ApiService) {
environmentService: EnvironmentService, stateService: StateService,
apiService: ApiService, private route: ActivatedRoute) {
super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService,
storageService, vaultTimeoutService, environmentService, stateService, apiService);
}
async ngOnInit() {
await super.ngOnInit();
this.route.queryParams.subscribe((params) => {
if (this.supportsBiometric && params.promptBiometric) {
setTimeout(() => this.unlockBiometric(), 1000);
}
});
}
}