mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Code refactoring (Translator, Stores, ko)
This commit is contained in:
parent
929bffccef
commit
b42ce01e7e
102 changed files with 6775 additions and 6511 deletions
|
|
@ -11,6 +11,8 @@
|
|||
Utils = require('Common/Utils'),
|
||||
Links = require('Common/Links'),
|
||||
|
||||
UserSettingsStore = require('Stores/UserSettings'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data')
|
||||
;
|
||||
|
|
@ -20,11 +22,10 @@
|
|||
*/
|
||||
function GeneralAdminSettings()
|
||||
{
|
||||
this.mainLanguage = Data.mainLanguage;
|
||||
this.mainTheme = Data.mainTheme;
|
||||
|
||||
this.language = Data.language;
|
||||
this.theme = Data.theme;
|
||||
this.language = UserSettingsStore.language;
|
||||
this.languages = UserSettingsStore.languages;
|
||||
this.theme = UserSettingsStore.theme;
|
||||
this.themes = UserSettingsStore.themes;
|
||||
|
||||
this.capaThemes = Data.capaThemes;
|
||||
this.capaUserBackground = Data.capaUserBackground;
|
||||
|
|
@ -44,16 +45,16 @@
|
|||
].join('') : '';
|
||||
|
||||
this.themesOptions = ko.computed(function () {
|
||||
return _.map(Data.themes(), function (sTheme) {
|
||||
return _.map(this.themes(), function (sTheme) {
|
||||
return {
|
||||
'optValue': sTheme,
|
||||
'optText': Utils.convertThemeName(sTheme)
|
||||
};
|
||||
});
|
||||
});
|
||||
}, this);
|
||||
|
||||
this.mainLanguageFullName = ko.computed(function () {
|
||||
return Utils.convertLangName(this.mainLanguage());
|
||||
this.languageFullName = ko.computed(function () {
|
||||
return Utils.convertLangName(this.language());
|
||||
}, this);
|
||||
|
||||
this.attachmentLimitTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue