mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
AutoLogout always allowed
This commit is contained in:
parent
be8c453cac
commit
dec2c1e84c
6 changed files with 5 additions and 19 deletions
|
|
@ -41,9 +41,7 @@ export class SettingsUserScreen extends AbstractSettingsScreen {
|
|||
views.push(UserSettingsFilters);
|
||||
}
|
||||
|
||||
if (SettingsCapa('AutoLogout') || SettingsCapa('OpenPGP') || SettingsCapa('GnuPG')) {
|
||||
views.push(UserSettingsSecurity);
|
||||
}
|
||||
views.push(UserSettingsSecurity);
|
||||
|
||||
views.push(UserSettingsFolders);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,11 +21,8 @@ export class UserSettingsSecurity extends AbstractViewSettings {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.capaAutoLogout = SettingsCapa('AutoLogout');
|
||||
|
||||
this.autoLogout = SettingsUserStore.autoLogout;
|
||||
|
||||
let i18nLogout = (key, params) => i18n('SETTINGS_SECURITY/AUTOLOGIN_' + key, params);
|
||||
this.autoLogout = SettingsUserStore.autoLogout;
|
||||
this.autoLogoutOptions = koComputable(() => {
|
||||
translateTrigger();
|
||||
return [
|
||||
|
|
@ -39,10 +36,7 @@ export class UserSettingsSecurity extends AbstractViewSettings {
|
|||
{ id: 60 * 10, name: i18nLogout('HOURS_OPTION_NAME', { HOURS: 10 }) }
|
||||
];
|
||||
});
|
||||
|
||||
if (this.capaAutoLogout) {
|
||||
this.addSetting('AutoLogout');
|
||||
}
|
||||
this.addSetting('AutoLogout');
|
||||
|
||||
this.gnupgPublicKeys = GnuPGUserStore.publicKeys;
|
||||
this.gnupgPrivateKeys = GnuPGUserStore.privateKeys;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export const SettingsUserStore = new class {
|
|||
let iAutoLogoutTimer;
|
||||
self.delayLogout = (() => {
|
||||
clearTimeout(iAutoLogoutTimer);
|
||||
if (0 < self.autoLogout() && !SettingsGet('AccountSignMe') && SettingsCapa('AutoLogout')) {
|
||||
if (0 < self.autoLogout() && !SettingsGet('AccountSignMe')) {
|
||||
iAutoLogoutTimer = setTimeout(
|
||||
rl.app.logout,
|
||||
self.autoLogout() * 60000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue