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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user