2016-08-17 06:01:20 +08:00
|
|
|
import ko from 'ko';
|
2019-07-05 03:19:24 +08:00
|
|
|
import { Capa } from 'Common/Enums';
|
2016-08-17 06:01:20 +08:00
|
|
|
import * as Settings from 'Storage/Settings';
|
2016-06-30 08:02:45 +08:00
|
|
|
|
2019-07-05 03:19:24 +08:00
|
|
|
class CapaAdminStore {
|
2016-08-17 06:01:20 +08:00
|
|
|
constructor() {
|
|
|
|
this.additionalAccounts = ko.observable(false);
|
|
|
|
this.identities = ko.observable(false);
|
|
|
|
this.gravatar = 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);
|
|
|
|
}
|
2016-06-30 08:02:45 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
populate() {
|
|
|
|
this.additionalAccounts(Settings.capa(Capa.AdditionalAccounts));
|
|
|
|
this.identities(Settings.capa(Capa.Identities));
|
|
|
|
this.gravatar(Settings.capa(Capa.Gravatar));
|
|
|
|
this.attachmentThumbnails(Settings.capa(Capa.AttachmentThumbnails));
|
|
|
|
this.sieve(Settings.capa(Capa.Sieve));
|
|
|
|
this.filters(Settings.capa(Capa.Filters));
|
|
|
|
this.themes(Settings.capa(Capa.Themes));
|
|
|
|
this.userBackground(Settings.capa(Capa.UserBackground));
|
|
|
|
this.openPGP(Settings.capa(Capa.OpenPGP));
|
|
|
|
this.twoFactorAuth(Settings.capa(Capa.TwoFactor));
|
|
|
|
this.twoFactorAuthForce(Settings.capa(Capa.TwoFactorForce));
|
|
|
|
this.templates(Settings.capa(Capa.Templates));
|
|
|
|
}
|
|
|
|
}
|
2016-06-30 08:02:45 +08:00
|
|
|
|
2016-09-13 04:50:21 +08:00
|
|
|
export default new CapaAdminStore();
|