snappymail/dev/Stores/Admin/App.jsx
2016-04-20 20:31:24 +03:00

32 lines
803 B
JavaScript

import ko from 'ko';
import Settings 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(!!Settings.settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
}
}
module.exports = new AppAdminStore();