mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Code refactoring
This commit is contained in:
parent
79233ad83c
commit
286ab567af
53 changed files with 618 additions and 581 deletions
|
|
@ -6,7 +6,9 @@
|
|||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Settings = require('Storage/Settings')
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
AppStore = require('Stores/App')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
@ -14,10 +16,7 @@
|
|||
*/
|
||||
function AppAdminStore()
|
||||
{
|
||||
// same
|
||||
this.allowLanguagesOnSettings = ko.observable(true);
|
||||
this.allowLanguagesOnLogin = ko.observable(true);
|
||||
// ----
|
||||
AppStore.call(this);
|
||||
|
||||
this.determineUserLanguage = ko.observable(false);
|
||||
this.determineUserDomain = ko.observable(false);
|
||||
|
|
@ -28,8 +27,7 @@
|
|||
|
||||
AppAdminStore.prototype.populate = function()
|
||||
{
|
||||
this.allowLanguagesOnLogin(!!Settings.settingsGet('AllowLanguagesOnLogin'));
|
||||
this.allowLanguagesOnSettings(!!Settings.settingsGet('AllowLanguagesOnSettings'));
|
||||
AppStore.prototype.populate.call(this);
|
||||
|
||||
this.determineUserLanguage(!!Settings.settingsGet('DetermineUserLanguage'));
|
||||
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
*/
|
||||
function DomainAdminStore()
|
||||
{
|
||||
this.collection = ko.observableArray([]);
|
||||
this.collection.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.domains = ko.observableArray([]);
|
||||
this.domains.loading = ko.observable(false).extend({'throttle': 100});
|
||||
}
|
||||
|
||||
module.exports = new DomainAdminStore();
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function PluginAdminStore()
|
||||
function PackageAdminStore()
|
||||
{
|
||||
this.collection = ko.observableArray([]);
|
||||
this.collection.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.packages = ko.observableArray([]);
|
||||
this.packages.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
this.packagesReal = ko.observable(true);
|
||||
this.packagesMainUpdatable = ko.observable(true);
|
||||
}
|
||||
|
||||
module.exports = new PluginAdminStore();
|
||||
module.exports = new PackageAdminStore();
|
||||
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@
|
|||
*/
|
||||
function PluginAdminStore()
|
||||
{
|
||||
this.collection = ko.observableArray([]);
|
||||
this.collection.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.collection.error = ko.observable('');
|
||||
this.plugins = ko.observableArray([]);
|
||||
this.plugins.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.plugins.error = ko.observable('');
|
||||
}
|
||||
|
||||
module.exports = new PluginAdminStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue