snappymail/dev/Stores/Admin/App.jsx
2016-07-15 22:54:37 +03:00

30 lines
770 B
JavaScript

import ko from 'ko';
import {settingsGet} from 'Storage/Settings';
import {AbstractAppStore} from 'Stores/AbstractApp';
class AppAdminStore extends AbstractAppStore
{
constructor()
{
super();
this.determineUserLanguage = ko.observable(false);
this.determineUserDomain = ko.observable(false);
this.weakPassword = ko.observable(false);
this.useLocalProxyForExternalImages = ko.observable(false);
}
populate() {
super.populate();
this.determineUserLanguage(!!settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!settingsGet('DetermineUserDomain'));
this.weakPassword(!!settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!settingsGet('UseLocalProxyForExternalImages'));
}
}
module.exports = new AppAdminStore();