snappymail/dev/Stores/Admin/Capa.js
djmaze aeb5275648 Improved boot.js with existing global window.rl
Put dev/Storage/Settings.js in boots.js global rl.settings
2020-09-04 12:05:17 +02:00

35 lines
1.1 KiB
JavaScript

import ko from 'ko';
import { Capa } from 'Common/Enums';
class CapaAdminStore {
constructor() {
this.additionalAccounts = ko.observable(false);
this.identities = ko.observable(false);
this.attachmentThumbnails = ko.observable(false);
this.sieve = ko.observable(false);
this.filters = ko.observable(false);
this.themes = ko.observable(true);
this.userBackground = ko.observable(false);
this.openPGP = ko.observable(false);
this.twoFactorAuth = ko.observable(false);
this.twoFactorAuthForce = ko.observable(false);
this.templates = ko.observable(false);
}
populate() {
let capa = rl.settings.capa;
this.additionalAccounts(capa(Capa.AdditionalAccounts));
this.identities(capa(Capa.Identities));
this.attachmentThumbnails(capa(Capa.AttachmentThumbnails));
this.sieve(capa(Capa.Sieve));
this.filters(capa(Capa.Filters));
this.themes(capa(Capa.Themes));
this.userBackground(capa(Capa.UserBackground));
this.openPGP(capa(Capa.OpenPGP));
this.twoFactorAuth(capa(Capa.TwoFactor));
this.twoFactorAuthForce(capa(Capa.TwoFactorForce));
this.templates(capa(Capa.Templates));
}
}
export default new CapaAdminStore();