1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

soft lock with PIN

This commit is contained in:
Kyle Spearrin
2019-02-14 14:00:09 -05:00
parent 2c91a2004c
commit 1002991022
6 changed files with 59 additions and 15 deletions

View File

@@ -120,7 +120,7 @@ export class AppComponent implements OnInit {
this.logOut(!!message.expired);
break;
case 'lockVault':
await this.lockService.lock();
await this.lockService.lock(true);
break;
case 'locked':
this.router.navigate(['lock'], { queryParams: { refresh: true } });
@@ -175,7 +175,7 @@ export class AppComponent implements OnInit {
private async updateAppMenu() {
this.messagingService.send('updateAppMenu', {
isAuthenticated: await this.userService.isAuthenticated(),
isLocked: !(await this.cryptoService.hasKey()),
isLocked: await this.lockService.isLocked(),
});
}
@@ -192,8 +192,10 @@ export class AppComponent implements OnInit {
this.folderService.clear(userId),
this.collectionService.clear(userId),
this.passwordGenerationService.clear(),
this.lockService.clear(),
]);
this.lockService.pinLocked = false;
this.searchService.clearIndex();
this.authService.logOut(async () => {
this.analytics.eventTrack.next({ action: 'Logged Out' });