mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +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;
|
||||
getDomain: (uriString: string) => string;
|
||||
isViewOpen: () => boolean;
|
||||
lockTimeout: () => number;
|
||||
launchUri: (uri: string, options?: any) => void;
|
||||
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
|
||||
getApplicationVersion: () => string;
|
||||
|
@ -103,6 +103,10 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
||||
return false;
|
||||
}
|
||||
|
||||
lockTimeout(): number {
|
||||
return null;
|
||||
}
|
||||
|
||||
launchUri(uri: string, options?: any): void {
|
||||
shell.openExternal(uri);
|
||||
}
|
||||
|
@ -42,7 +42,10 @@ export class LockService implements LockServiceAbstraction {
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user