mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Small fixes
This commit is contained in:
parent
cc6626c374
commit
276e8c48e8
10 changed files with 67 additions and 39 deletions
|
|
@ -46,6 +46,7 @@
|
|||
'Filters': 'FILTERS',
|
||||
'AttachmentThumbnails': 'ATTACHMENT_THUMBNAILS',
|
||||
'Templates': 'TEMPLATES',
|
||||
'AutoLogout': 'AUTOLOGOUT',
|
||||
'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS'
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
*/
|
||||
Plugins.prototype.addSettingsViewModel = function (SettingsViewModelClass, sTemplate, sLabelName, sRoute)
|
||||
{
|
||||
this.aViewModelsHooks.push([SettingsViewModelClass, sTemplate, sLabelName, sRoute]);
|
||||
this.aUserViewModelsHooks.push([SettingsViewModelClass, sTemplate, sLabelName, sRoute]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
Plugins.prototype.runSettingsViewModelHooks = function (bAdmin)
|
||||
{
|
||||
_.each(bAdmin ? this.aAdminViewModelsHooks : this.aViewModelsHooks, function (aView) {
|
||||
_.each(bAdmin ? this.aAdminViewModelsHooks : this.aUserViewModelsHooks, function (aView) {
|
||||
require('Knoin/Knoin').addSettingsViewModel(aView[0], aView[1], aView[2], aView[3]);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,8 +65,11 @@
|
|||
'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters');
|
||||
}
|
||||
|
||||
kn.addSettingsViewModel(require('Settings/User/Security'),
|
||||
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
|
||||
if (Settings.capa(Enums.Capa.AutoLogout) || Settings.capa(Enums.Capa.TwoFactor))
|
||||
{
|
||||
kn.addSettingsViewModel(require('Settings/User/Security'),
|
||||
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
|
||||
}
|
||||
|
||||
if ((Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) ||
|
||||
Settings.settingsGet('AllowFacebookSocial') ||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
function SecurityUserSettings()
|
||||
{
|
||||
this.capaAutoLogout = Settings.capa(Enums.Capa.AutoLogout);
|
||||
this.capaTwoFactor = Settings.capa(Enums.Capa.TwoFactor);
|
||||
|
||||
this.autoLogout = SettinsStore.autoLogout;
|
||||
|
|
@ -212,21 +213,24 @@
|
|||
Remote.getTwoFactor(this.onResult);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
if (this.capaAutoLogout)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
_.delay(function () {
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
f0 = Utils.settingsSaveHelperSimpleFunction(self.autoLogout.trigger, self)
|
||||
;
|
||||
var
|
||||
f0 = Utils.settingsSaveHelperSimpleFunction(self.autoLogout.trigger, self)
|
||||
;
|
||||
|
||||
self.autoLogout.subscribe(function (sValue) {
|
||||
Remote.saveSettings(f0, {
|
||||
'AutoLogout': Utils.pInt(sValue)
|
||||
self.autoLogout.subscribe(function (sValue) {
|
||||
Remote.saveSettings(f0, {
|
||||
'AutoLogout': Utils.pInt(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SecurityUserSettings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue