mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 00:35:50 +01:00
refactoring of access to options in frontend
This commit is contained in:
@@ -6,7 +6,7 @@ const PROTECTED_SESSION_ID_KEY = 'protectedSessionId';
|
||||
let lastProtectedSessionOperationDate = null;
|
||||
let protectedSessionTimeout = null;
|
||||
|
||||
optionsInitService.addLoadListener(options => setProtectedSessionTimeout(options.protectedSessionTimeout));
|
||||
optionsInitService.addLoadListener(options => setProtectedSessionTimeout(options.getInt('protectedSessionTimeout')));
|
||||
|
||||
setInterval(() => {
|
||||
if (lastProtectedSessionOperationDate !== null && Date.now() - lastProtectedSessionOperationDate.getTime() > protectedSessionTimeout * 1000) {
|
||||
|
||||
Reference in New Issue
Block a user