From 035dc1bbb1951bfe99740009f8b999c65861d133 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sat, 1 Dec 2018 14:34:39 +0100 Subject: Move default feature config to config.js --- src/features/serviceProxy/index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/features/serviceProxy') diff --git a/src/features/serviceProxy/index.js b/src/features/serviceProxy/index.js index edb1c9367..50dea8c9b 100644 --- a/src/features/serviceProxy/index.js +++ b/src/features/serviceProxy/index.js @@ -1,16 +1,15 @@ import { autorun, reaction, observable } from 'mobx'; import { remote } from 'electron'; +import { DEFAULT_FEATURES_CONFIG } from '../../config'; + const { session } = remote; const debug = require('debug')('Franz:feature:serviceProxy'); -const DEFAULT_ENABLED = false; -const DEFAULT_IS_PREMIUM = true; - export const config = observable({ - isEnabled: DEFAULT_ENABLED, - isPremium: DEFAULT_IS_PREMIUM, + isEnabled: DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled, + isPremium: DEFAULT_FEATURES_CONFIG.isServiceProxyPremiumFeature, }); export default function init(stores) { @@ -25,8 +24,8 @@ export default function init(stores) { const { isServiceProxyEnabled, isServiceProxyPremiumFeature } = stores.features.features; - config.isEnabled = isServiceProxyEnabled !== undefined ? isServiceProxyEnabled : DEFAULT_ENABLED; - config.isPremium = isServiceProxyPremiumFeature !== undefined ? isServiceProxyPremiumFeature : DEFAULT_IS_PREMIUM; + config.isEnabled = isServiceProxyEnabled !== undefined ? isServiceProxyEnabled : DEFAULT_FEATURES_CONFIG.isServiceProxyEnabled; + config.isPremium = isServiceProxyPremiumFeature !== undefined ? isServiceProxyPremiumFeature : DEFAULT_FEATURES_CONFIG.isServiceProxyPremiumFeature; autorun(() => { const services = stores.services.all; -- cgit v1.2.3-54-g00ecf