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-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() {
|
2020-10-27 18:09:24 +08:00
|
|
|
ko.addObservablesTo(this, {
|
|
|
|
additionalAccounts: false,
|
|
|
|
identities: false,
|
|
|
|
attachmentThumbnails: false,
|
|
|
|
sieve: false,
|
|
|
|
filters: false,
|
|
|
|
themes: true,
|
|
|
|
userBackground: false,
|
|
|
|
openPGP: false,
|
|
|
|
twoFactorAuth: false,
|
|
|
|
twoFactorAuthForce: false,
|
|
|
|
templates: false
|
|
|
|
});
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
2016-06-30 08:02:45 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
populate() {
|
2020-09-04 18:05:17 +08:00
|
|
|
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));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|
2016-06-30 08:02:45 +08:00
|
|
|
|
2016-09-13 04:50:21 +08:00
|
|
|
export default new CapaAdminStore();
|