2015-01-27 05:06:00 +08:00
|
|
|
|
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-01-27 05:06:00 +08:00
|
|
|
|
2015-11-19 01:32:29 +08:00
|
|
|
class AppAdminStore extends AbstractAppStore
|
|
|
|
{
|
|
|
|
constructor()
|
2015-01-27 05:06:00 +08:00
|
|
|
{
|
2015-11-19 01:32:29 +08:00
|
|
|
super();
|
2015-01-27 05:06:00 +08:00
|
|
|
|
|
|
|
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();
|
2015-01-27 05:06:00 +08:00
|
|
|
|
2016-07-16 03:54:37 +08:00
|
|
|
this.determineUserLanguage(!!settingsGet('DetermineUserLanguage'));
|
|
|
|
this.determineUserDomain(!!settingsGet('DetermineUserDomain'));
|
2015-01-27 05:06:00 +08:00
|
|
|
|
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-01-27 05:06:00 +08:00
|
|
|
|
2015-11-19 01:32:29 +08:00
|
|
|
module.exports = new AppAdminStore();
|