mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
setLockOption
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
export abstract class LockService {
|
export abstract class LockService {
|
||||||
checkLock: () => Promise<void>;
|
checkLock: () => Promise<void>;
|
||||||
lock: () => Promise<void>;
|
lock: () => Promise<void>;
|
||||||
|
setLockOption: (lockOption: number) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,4 +61,9 @@ export class LockService implements LockServiceAbstraction {
|
|||||||
this.collectionService.clearCache();
|
this.collectionService.clearCache();
|
||||||
this.messagingService.send('locked');
|
this.messagingService.send('locked');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async setLockOption(lockOption: number): Promise<void> {
|
||||||
|
await this.storageService.save(ConstantsService.lockOptionKey, lockOption);
|
||||||
|
await this.cryptoService.toggleKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user