mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-18 01:26:06 +08:00
Small fixes
This commit is contained in:
parent
adb92ba3ef
commit
d17f249f45
5 changed files with 18 additions and 11 deletions
|
@ -1050,6 +1050,8 @@
|
|||
oData.determineUserLanguage = ko.observable(false);
|
||||
oData.determineUserDomain = ko.observable(false);
|
||||
|
||||
oData.weakPassword = ko.observable(false);
|
||||
|
||||
oData.messagesPerPage = ko.observable(Consts.Defaults.MessagesPerPage);//.extend({'throttle': 200});
|
||||
|
||||
oData.mainMessagesPerPage = oData.messagesPerPage;
|
||||
|
@ -2055,7 +2057,7 @@
|
|||
|
||||
Utils.__themeTimer = 0;
|
||||
Utils.__themeAjax = null;
|
||||
|
||||
|
||||
Utils.changeTheme = function (sValue, themeTrigger)
|
||||
{
|
||||
var
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
this.capaAdditionalAccounts = Data.capaAdditionalAccounts;
|
||||
this.capaAdditionalIdentities = Data.capaAdditionalIdentities;
|
||||
|
||||
this.weakPassword = Data.weakPassword;
|
||||
|
||||
this.mainAttachmentLimit = ko.observable(Utils.pInt(Settings.settingsGet('AttachmentLimit')) / (1024 * 1024)).extend({'posInterer': 25});
|
||||
this.uploadData = Settings.settingsGet('PhpUploadSizes');
|
||||
this.uploadDataDesc = this.uploadData && (this.uploadData['upload_max_filesize'] || this.uploadData['post_max_size']) ?
|
||||
[
|
||||
this.uploadData['upload_max_filesize'] ? 'upload_max_filesize = ' + this.uploadData['upload_max_filesize'] + '; ' : '',
|
||||
this.uploadData['post_max_size'] ? 'post_max_size = ' + this.uploadData['post_max_size'] : ''
|
||||
].join('')
|
||||
: '';
|
||||
this.uploadDataDesc = this.uploadData && (this.uploadData['upload_max_filesize'] || this.uploadData['post_max_size']) ? [
|
||||
this.uploadData['upload_max_filesize'] ? 'upload_max_filesize = ' + this.uploadData['upload_max_filesize'] + '; ' : '',
|
||||
this.uploadData['post_max_size'] ? 'post_max_size = ' + this.uploadData['post_max_size'] : ''
|
||||
].join('') : '';
|
||||
|
||||
this.themesOptions = ko.computed(function () {
|
||||
return _.map(Data.themes(), function (sTheme) {
|
||||
|
@ -54,8 +54,6 @@
|
|||
return Utils.convertLangName(this.mainLanguage());
|
||||
}, this);
|
||||
|
||||
this.weakPassword = !!Settings.settingsGet('WeakPassword');
|
||||
|
||||
this.attachmentLimitTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.languageTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.themeTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
@ -89,7 +87,7 @@
|
|||
});
|
||||
|
||||
self.theme.subscribe(function (sValue) {
|
||||
|
||||
|
||||
Utils.changeTheme(sValue, self.themeTrigger);
|
||||
|
||||
Remote.saveAdminConfig(f3, {
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
{
|
||||
this.useLocalProxyForExternalImages = Data.useLocalProxyForExternalImages;
|
||||
|
||||
this.weakPassword = Data.weakPassword;
|
||||
|
||||
this.capaOpenPGP = ko.observable(Settings.capa(Enums.Capa.OpenPGP));
|
||||
this.capaTwoFactorAuth = ko.observable(Settings.capa(Enums.Capa.TwoFactor));
|
||||
|
||||
|
@ -96,6 +98,8 @@
|
|||
this.adminPasswordNew2('');
|
||||
|
||||
this.adminPasswordUpdateSuccess(true);
|
||||
|
||||
this.weakPassword(!!oData.Result.Weak);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
this.determineUserLanguage(!!Settings.settingsGet('DetermineUserLanguage'));
|
||||
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
|
||||
|
||||
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
|
||||
|
||||
this.capaThemes(Settings.capa(Enums.Capa.Themes));
|
||||
this.allowLanguagesOnLogin(!!Settings.settingsGet('AllowLanguagesOnLogin'));
|
||||
this.allowLanguagesOnSettings(!!Settings.settingsGet('AllowLanguagesOnSettings'));
|
||||
|
|
|
@ -2728,7 +2728,8 @@ class Actions
|
|||
$bResult = true;
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, $bResult ? $oConfig->Save() : false);
|
||||
return $this->DefaultResponse(__FUNCTION__, $bResult ?
|
||||
($oConfig->Save() ? array('Weak' => $oConfig->ValidatePassword('12345')) : false) : false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue