snappymail/dev/Stores/Admin/App.jsx
2016-06-16 02:36:44 +03:00

32 lines
808 B
JavaScript

import ko from 'ko';
import * as 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();