aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/workspaces/store.js')
-rw-r--r--src/features/workspaces/store.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index 4d65712a7..7bd969be0 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -19,9 +19,11 @@ const debug = require('debug')('Franz:feature:workspaces:store');
19export default class WorkspacesStore extends FeatureStore { 19export default class WorkspacesStore extends FeatureStore {
20 @observable isFeatureEnabled = false; 20 @observable isFeatureEnabled = false;
21 21
22 @observable isFeatureActive = false;
23
22 @observable isPremiumFeature = true; 24 @observable isPremiumFeature = true;
23 25
24 @observable isFeatureActive = false; 26 @observable isPremiumUpgradeRequired = true;
25 27
26 @observable activeWorkspace = null; 28 @observable activeWorkspace = null;
27 29
@@ -46,10 +48,6 @@ export default class WorkspacesStore extends FeatureStore {
46 return getUserWorkspacesRequest.wasExecuted && this.workspaces.length > 0; 48 return getUserWorkspacesRequest.wasExecuted && this.workspaces.length > 0;
47 } 49 }
48 50
49 @computed get isPremiumUpgradeRequired() {
50 return this.isFeatureEnabled && !this.isFeatureActive;
51 }
52
53 start(stores, actions) { 51 start(stores, actions) {
54 debug('WorkspacesStore::start'); 52 debug('WorkspacesStore::start');
55 this.stores = stores; 53 this.stores = stores;
@@ -194,8 +192,11 @@ export default class WorkspacesStore extends FeatureStore {
194 }; 192 };
195 193
196 _setIsPremiumFeatureReaction = () => { 194 _setIsPremiumFeatureReaction = () => {
197 const { isWorkspacePremiumFeature } = this.stores.features.features; 195 const { features, user } = this.stores;
196 const { isPremium } = user.data;
197 const { isWorkspacePremiumFeature } = features.features;
198 this.isPremiumFeature = isWorkspacePremiumFeature; 198 this.isPremiumFeature = isWorkspacePremiumFeature;
199 this.isPremiumUpgradeRequired = isWorkspacePremiumFeature && !isPremium;
199 }; 200 };
200 201
201 _setWorkspaceBeingEditedReaction = () => { 202 _setWorkspaceBeingEditedReaction = () => {