mirror of
https://github.com/bitwarden/web
synced 2026-01-02 08:33:18 +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)) {
|
||||
|
||||
@@ -94,7 +94,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||
}
|
||||
|
||||
lockTimeout(): number {
|
||||
return 15;
|
||||
return null;
|
||||
}
|
||||
|
||||
launchUri(uri: string, options?: any): void {
|
||||
|
||||
Reference in New Issue
Block a user