1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

setLockOption

This commit is contained in:
Kyle Spearrin 2018-02-11 00:38:17 -05:00
parent 6c3f0a538f
commit 4960fa18c0
2 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
export abstract class LockService {
checkLock: () => Promise<void>;
lock: () => Promise<void>;
setLockOption: (lockOption: number) => Promise<void>;
}

View File

@ -61,4 +61,9 @@ export class LockService implements LockServiceAbstraction {
this.collectionService.clearCache();
this.messagingService.send('locked');
}
async setLockOption(lockOption: number): Promise<void> {
await this.storageService.save(ConstantsService.lockOptionKey, lockOption);
await this.cryptoService.toggleKey();
}
}