snappymail/dev/Stores/Admin/App.jsx

33 lines
808 B
React
Raw Normal View History

2015-11-19 01:32:29 +08:00
import ko from 'ko';
2016-06-16 07:36:44 +08:00
import * as Settings from 'Storage/Settings';
2015-11-19 01:32:29 +08:00
import {AbstractAppStore} from 'Stores/AbstractApp';
2015-11-19 01:32:29 +08:00
class AppAdminStore extends AbstractAppStore
{
constructor()
{
2015-11-19 01:32:29 +08:00
super();
this.determineUserLanguage = ko.observable(false);
this.determineUserDomain = ko.observable(false);
this.weakPassword = ko.observable(false);
this.useLocalProxyForExternalImages = ko.observable(false);
}
2015-11-19 01:32:29 +08:00
populate() {
super.populate();
this.determineUserLanguage(!!Settings.settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!Settings.settingsGet('DetermineUserDomain'));
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
2016-04-21 01:12:51 +08:00
}
2015-11-19 01:32:29 +08:00
}
2015-11-19 01:32:29 +08:00
module.exports = new AppAdminStore();