Upload via GUI (275 Dateien)
This commit is contained in:
@@ -279,6 +279,16 @@ window.sessionTimerTimeout = <?= (int)$_jsTimeout ?>;
|
||||
['click','keydown','mousemove','scroll','touchstart'].forEach(function(ev) {
|
||||
document.addEventListener(ev, resetTimer, { passive: true });
|
||||
});
|
||||
|
||||
// Restzeit regelmäßig beim Server erfragen (verlängert nichts): Aktivität in einem anderen Tab verlängert die Zeit hier mit,
|
||||
// und ist die Sitzung wirklich abgelaufen, geht es sofort zur Anmeldung
|
||||
function syncTimer() {
|
||||
fetch('/staff/session_ping.php?check=1', { credentials:'same-origin', cache:'no-store' })
|
||||
.then(function(r){ if (r.status === 401) { window.location.href = '/staff/login.php'; return null; } return r.json(); })
|
||||
.then(function(d){ if (d && typeof d.remaining === 'number') remaining = d.remaining; })
|
||||
.catch(function(){});
|
||||
}
|
||||
setInterval(syncTimer, 30000);
|
||||
} // end init
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
|
||||
Reference in New Issue
Block a user