1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

allow users to change lock options, default to 15 min

This commit is contained in:
Kyle Spearrin
2018-07-27 15:08:59 -04:00
parent 4b4e847816
commit f385c3773c
6 changed files with 63 additions and 2 deletions

View File

@@ -7,6 +7,13 @@ export class HtmlStorageService implements StorageService {
ConstantsService.localeKey, ConstantsService.lockOptionKey]);
private localStorageStartsWithKeys = ['twoFactorToken_'];
async init() {
const lockOption = await this.get<number>(ConstantsService.lockOptionKey);
if (lockOption == null) {
await this.save(ConstantsService.lockOptionKey, 15);
}
}
get<T>(key: string): Promise<T> {
let json: string = null;
if (this.isLocalStorage(key)) {