mirror of
https://github.com/bitwarden/jslib
synced 2025-12-23 19:53:55 +00:00
[bug] Ensure lock component is always working with the latest active account in state
This commit is contained in:
@@ -47,6 +47,7 @@ export class LockComponent implements OnInit {
|
|||||||
protected apiService: ApiService, private logService: LogService) { }
|
protected apiService: ApiService, private logService: LogService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
this.stateService.accounts.subscribe(async _accounts => {
|
||||||
this.pinSet = await this.vaultTimeoutService.isPinLockSet();
|
this.pinSet = await this.vaultTimeoutService.isPinLockSet();
|
||||||
this.pinLock = (this.pinSet[0] && (await this.stateService.getEncryptedPinProtected()) != null) || this.pinSet[1];
|
this.pinLock = (this.pinSet[0] && (await this.stateService.getEncryptedPinProtected()) != null) || this.pinSet[1];
|
||||||
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
|
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
|
||||||
@@ -58,6 +59,7 @@ export class LockComponent implements OnInit {
|
|||||||
const webVaultUrl = this.environmentService.getWebVaultUrl();
|
const webVaultUrl = this.environmentService.getWebVaultUrl();
|
||||||
const vaultUrl = webVaultUrl === 'https://vault.bitwarden.com' ? 'https://bitwarden.com' : webVaultUrl;
|
const vaultUrl = webVaultUrl === 'https://vault.bitwarden.com' ? 'https://bitwarden.com' : webVaultUrl;
|
||||||
this.webVaultHostname = Utils.getHostname(vaultUrl);
|
this.webVaultHostname = Utils.getHostname(vaultUrl);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user