2015-01-27 05:06:00 +08:00
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var
|
|
|
|
ko = require('ko'),
|
|
|
|
|
|
|
|
Enums = require('Common/Enums'),
|
|
|
|
|
|
|
|
Settings = require('Storage/Settings')
|
|
|
|
;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
function CapaAdminStore()
|
|
|
|
{
|
|
|
|
this.additionalAccounts = ko.observable(false);
|
|
|
|
this.gravatar = ko.observable(false);
|
|
|
|
this.attachmentThumbnails = ko.observable(false);
|
|
|
|
this.sieve = ko.observable(false);
|
2015-02-05 07:54:26 +08:00
|
|
|
this.filters = ko.observable(false);
|
2015-01-27 05:06:00 +08:00
|
|
|
this.themes = ko.observable(true);
|
|
|
|
this.userBackground = ko.observable(false);
|
|
|
|
this.openPGP = ko.observable(false);
|
|
|
|
this.twoFactorAuth = ko.observable(false);
|
2015-04-08 00:39:43 +08:00
|
|
|
this.twoFactorAuthForce = ko.observable(false);
|
2015-02-12 05:39:27 +08:00
|
|
|
this.templates = ko.observable(false);
|
2015-01-27 05:06:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
CapaAdminStore.prototype.populate = function()
|
|
|
|
{
|
|
|
|
this.additionalAccounts(Settings.capa(Enums.Capa.AdditionalAccounts));
|
|
|
|
this.gravatar(Settings.capa(Enums.Capa.Gravatar));
|
|
|
|
this.attachmentThumbnails(Settings.capa(Enums.Capa.AttachmentThumbnails));
|
|
|
|
this.sieve(Settings.capa(Enums.Capa.Sieve));
|
2015-02-05 07:54:26 +08:00
|
|
|
this.filters(Settings.capa(Enums.Capa.Filters));
|
2015-01-27 05:06:00 +08:00
|
|
|
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));
|
2015-04-08 00:39:43 +08:00
|
|
|
this.twoFactorAuthForce(Settings.capa(Enums.Capa.TwoFactorForce));
|
2015-02-12 05:39:27 +08:00
|
|
|
this.templates(Settings.capa(Enums.Capa.Templates));
|
2015-01-27 05:06:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = new CapaAdminStore();
|
|
|
|
|
|
|
|
}());
|