mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
allow static lock timeout definition
This commit is contained in:
parent
7b05416d55
commit
cd3c2ddff1
@ -15,6 +15,7 @@ export abstract class PlatformUtilsService {
|
|||||||
analyticsId: () => string;
|
analyticsId: () => string;
|
||||||
getDomain: (uriString: string) => string;
|
getDomain: (uriString: string) => string;
|
||||||
isViewOpen: () => boolean;
|
isViewOpen: () => boolean;
|
||||||
|
lockTimeout: () => number;
|
||||||
launchUri: (uri: string, options?: any) => void;
|
launchUri: (uri: string, options?: any) => void;
|
||||||
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
|
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
|
||||||
getApplicationVersion: () => string;
|
getApplicationVersion: () => string;
|
||||||
|
@ -103,6 +103,10 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lockTimeout(): number {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
launchUri(uri: string, options?: any): void {
|
launchUri(uri: string, options?: any): void {
|
||||||
shell.openExternal(uri);
|
shell.openExternal(uri);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,10 @@ export class LockService implements LockServiceAbstraction {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lockOption = await this.storageService.get<number>(ConstantsService.lockOptionKey);
|
let lockOption = this.platformUtilsService.lockTimeout();
|
||||||
|
if (lockOption == null) {
|
||||||
|
lockOption = await this.storageService.get<number>(ConstantsService.lockOptionKey);
|
||||||
|
}
|
||||||
if (lockOption == null || lockOption < 0) {
|
if (lockOption == null || lockOption < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user