|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
var logoutTimer = 0;
|
|
|
|
|
var logoutMessage;
|
|
|
|
|
function startLogoutTimer() {
|
|
|
|
|
if (app.config.adminReloginDuration <= 0) {
|
|
|
|
|
return;
|
|
|
|
@ -10,11 +11,10 @@
|
|
|
|
|
clearTimeout(logoutTimer);
|
|
|
|
|
}
|
|
|
|
|
// pre-translate language string gh#9046
|
|
|
|
|
var translated;
|
|
|
|
|
if (!translated) {
|
|
|
|
|
if (!logoutMessage) {
|
|
|
|
|
require(['translator'], function (translator) {
|
|
|
|
|
translator.translate('[[login:logged-out-due-to-inactivity]]', function (_translated) {
|
|
|
|
|
translated = _translated;
|
|
|
|
|
translator.translate('[[login:logged-out-due-to-inactivity]]', function (translated) {
|
|
|
|
|
logoutMessage = translated;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
logoutTimer = setTimeout(function () {
|
|
|
|
|
bootbox.alert({
|
|
|
|
|
closeButton: false,
|
|
|
|
|
message: translated,
|
|
|
|
|
message: logoutMessage,
|
|
|
|
|
callback: function () {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},
|
|
|
|
|