Sound notification

Additional code refactoring
This commit is contained in:
RainLoop Team 2015-01-27 01:06:00 +04:00
parent b42ce01e7e
commit aa84077ac4
87 changed files with 1573 additions and 574 deletions

43
dev/Stores/Admin/App.js Normal file
View file

@ -0,0 +1,43 @@
(function () {
'use strict';
var
ko = require('ko'),
Settings = require('Storage/Settings')
;
/**
* @constructor
*/
function AppAdminStore()
{
// same
this.allowLanguagesOnSettings = ko.observable(true);
this.allowLanguagesOnLogin = ko.observable(true);
// ----
this.determineUserLanguage = ko.observable(false);
this.determineUserDomain = ko.observable(false);
this.weakPassword = ko.observable(false);
this.useLocalProxyForExternalImages = ko.observable(false);
}
AppAdminStore.prototype.populate = function()
{
this.allowLanguagesOnLogin(!!Settings.settingsGet('AllowLanguagesOnLogin'));
this.allowLanguagesOnSettings(!!Settings.settingsGet('AllowLanguagesOnSettings'));
this.determineUserLanguage(!!Settings.settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
};
module.exports = new AppAdminStore();
}());

45
dev/Stores/Admin/Capa.js Normal file
View file

@ -0,0 +1,45 @@
(function () {
'use strict';
var
ko = require('ko'),
Enums = require('Common/Enums'),
Settings = require('Storage/Settings')
;
/**
* @constructor
*/
function CapaAdminStore()
{
this.additionalAccounts = ko.observable(false);
this.additionalIdentities = ko.observable(false);
this.gravatar = ko.observable(false);
this.attachmentThumbnails = ko.observable(false);
this.sieve = ko.observable(false);
this.themes = ko.observable(true);
this.userBackground = ko.observable(false);
this.openPGP = ko.observable(false);
this.twoFactorAuth = ko.observable(false);
}
CapaAdminStore.prototype.populate = function()
{
this.additionalAccounts(Settings.capa(Enums.Capa.AdditionalAccounts));
this.additionalIdentities(Settings.capa(Enums.Capa.AdditionalIdentities));
this.gravatar(Settings.capa(Enums.Capa.Gravatar));
this.attachmentThumbnails(Settings.capa(Enums.Capa.AttachmentThumbnails));
this.sieve(Settings.capa(Enums.Capa.Sieve));
this.themes(Settings.capa(Enums.Capa.Themes));
this.userBackground(Settings.capa(Enums.Capa.UserBackground));
this.openPGP(Settings.capa(Enums.Capa.OpenPGP));
this.twoFactorAuth(Settings.capa(Enums.Capa.TwoFactor));
};
module.exports = new CapaAdminStore();
}());

29
dev/Stores/Admin/Core.js Normal file
View file

@ -0,0 +1,29 @@
(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function CoreAdminStore()
{
this.coreReal = ko.observable(true);
this.coreChannel = ko.observable('stable');
this.coreType = ko.observable('stable');
this.coreUpdatable = ko.observable(true);
this.coreAccess = ko.observable(true);
this.coreChecking = ko.observable(false).extend({'throttle': 100});
this.coreUpdating = ko.observable(false).extend({'throttle': 100});
this.coreRemoteVersion = ko.observable('');
this.coreRemoteRelease = ko.observable('');
this.coreVersionCompare = ko.observable(-2);
}
module.exports = new CoreAdminStore();
}());

View file

@ -0,0 +1,21 @@
(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function DomainAdminStore()
{
this.collection = ko.observableArray([]);
this.collection.loading = ko.observable(false).extend({'throttle': 100});
}
module.exports = new DomainAdminStore();
}());

View file

@ -0,0 +1,26 @@
(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function LicenseAdminStore()
{
this.licensing = ko.observable(false);
this.licensingProcess = ko.observable(false);
this.licenseValid = ko.observable(false);
this.licenseExpired = ko.observable(0);
this.licenseError = ko.observable('');
this.licenseTrigger = ko.observable(false);
}
module.exports = new LicenseAdminStore();
}());

View file

@ -0,0 +1,24 @@
(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function PluginAdminStore()
{
this.collection = ko.observableArray([]);
this.collection.loading = ko.observable(false).extend({'throttle': 100});
this.packagesReal = ko.observable(true);
this.packagesMainUpdatable = ko.observable(true);
}
module.exports = new PluginAdminStore();
}());

View file

@ -0,0 +1,22 @@
(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function PluginAdminStore()
{
this.collection = ko.observableArray([]);
this.collection.loading = ko.observable(false).extend({'throttle': 100});
this.collection.error = ko.observable('');
}
module.exports = new PluginAdminStore();
}());