mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Added auto logout option
This commit is contained in:
parent
76f319a07f
commit
bb551e4ec8
18 changed files with 171 additions and 33 deletions
|
|
@ -92,6 +92,10 @@
|
|||
Globals.$html.removeClass('rl-ctrl-key-pressed');
|
||||
}
|
||||
});
|
||||
|
||||
Globals.$doc.on('mousemove keypress click', _.debounce(function () {
|
||||
Events.pub('rl.auto-logout-refresh');
|
||||
}, 5000));
|
||||
}
|
||||
|
||||
_.extend(AbstractApp.prototype, AbstractBoot.prototype);
|
||||
|
|
|
|||
|
|
@ -1398,6 +1398,15 @@
|
|||
});
|
||||
};
|
||||
|
||||
AppUser.prototype.logout = function ()
|
||||
{
|
||||
var self = this;
|
||||
Remote.logout(function () {
|
||||
self.loginAndLogoutReload(true,
|
||||
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length);
|
||||
});
|
||||
};
|
||||
|
||||
AppUser.prototype.bootstartLoginScreen = function ()
|
||||
{
|
||||
Globals.$html.removeClass('rl-user-auth').addClass('rl-user-no-auth');
|
||||
|
|
@ -1568,6 +1577,10 @@
|
|||
Remote.appDelayStart(Utils.emptyFunction);
|
||||
}, 35000);
|
||||
|
||||
Events.sub('rl.auto-logout', function () {
|
||||
self.logout();
|
||||
});
|
||||
|
||||
Plugins.runHook('rl-start-user-screens');
|
||||
Events.pub('rl.bootstart-user-screens');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue