aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-01-10 13:43:23 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-02-12 13:39:02 +0100
commitfd04044be1fe7207e75ed7cb1ddb622cc9cc93bf (patch)
treef07b2d8a45dbba5225e122c13d0a044ae51836ea /src
parentbasic setup for workspaces feature (diff)
downloadferdium-app-fd04044be1fe7207e75ed7cb1ddb622cc9cc93bf.tar.gz
ferdium-app-fd04044be1fe7207e75ed7cb1ddb622cc9cc93bf.tar.zst
ferdium-app-fd04044be1fe7207e75ed7cb1ddb622cc9cc93bf.zip
define workspaces as premium feature
Diffstat (limited to 'src')
-rw-r--r--src/config.js1
-rw-r--r--src/features/workspaces/index.js6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/config.js b/src/config.js
index d7a485b8a..d327185f0 100644
--- a/src/config.js
+++ b/src/config.js
@@ -37,6 +37,7 @@ export const DEFAULT_FEATURES_CONFIG = {
37 }, 37 },
38 isServiceProxyEnabled: false, 38 isServiceProxyEnabled: false,
39 isServiceProxyPremiumFeature: true, 39 isServiceProxyPremiumFeature: true,
40 isWorkspacePremiumFeature: true,
40 isWorkspaceEnabled: true, 41 isWorkspaceEnabled: true,
41}; 42};
42 43
diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js
index b7e1090e8..b4cfd3c2d 100644
--- a/src/features/workspaces/index.js
+++ b/src/features/workspaces/index.js
@@ -13,7 +13,11 @@ export const state = observable(defaultState);
13export default function initWorkspaces(stores, actions) { 13export default function initWorkspaces(stores, actions) {
14 const { features, user } = stores; 14 const { features, user } = stores;
15 reaction( 15 reaction(
16 () => features.features.isWorkspaceEnabled && user.isLoggedIn, 16 () => (
17 features.features.isWorkspaceEnabled && (
18 !features.features.isWorkspacePremiumFeature || user.data.isPremium
19 )
20 ),
17 (isEnabled) => { 21 (isEnabled) => {
18 if (isEnabled) { 22 if (isEnabled) {
19 debug('Initializing `workspaces` feature'); 23 debug('Initializing `workspaces` feature');