snappymail/dev/Stores/Admin/App.jsx

31 lines
770 B
React
Raw Normal View History

2015-11-19 01:32:29 +08:00
import ko from 'ko';
2016-07-16 03:54:37 +08:00
import {settingsGet} 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();
2016-07-16 03:54:37 +08:00
this.determineUserLanguage(!!settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!settingsGet('DetermineUserDomain'));
2016-07-16 03:54:37 +08:00
this.weakPassword(!!settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!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();