snappymail/dev/Stores/Admin/App.js
djmaze e7180a86ce Made eslint using 'browser' environment and added globals, because RainLoop is used in browsers.
This also allowed to remove all webpack 'externals' overhead.
2020-08-12 00:25:36 +02:00

34 lines
943 B
JavaScript

import ko from 'ko';
import { settingsGet } 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);
this.dataFolderAccess = ko.observable(false);
}
populate() {
super.populate();
this.determineUserLanguage(!!settingsGet('DetermineUserLanguage'));
this.determineUserDomain(!!settingsGet('DetermineUserDomain'));
this.weakPassword(!!settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!settingsGet('UseLocalProxyForExternalImages'));
/*
if (settingsGet('Auth')) {
fetch('./data/VERSION?' + Math.random()).then(() => this.dataFolderAccess(true));
}
*/
}
}
export default new AppAdminStore();