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.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index 7f41cfc88..949f8a792 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -17,16 +17,18 @@ import { WORKSPACES_ROUTES } from './index';
17import { createReactions } from '../../stores/lib/Reaction'; 17import { createReactions } from '../../stores/lib/Reaction';
18import { createActionBindings } from '../utils/ActionBinding'; 18import { createActionBindings } from '../utils/ActionBinding';
19 19
20const debug = require('debug')('Franz:feature:workspaces:store'); 20import { KEEP_WS_LOADED_USID } from '../../config';
21
22const debug = require('debug')('Ferdi:feature:workspaces:store');
21 23
22export default class WorkspacesStore extends FeatureStore { 24export default class WorkspacesStore extends FeatureStore {
23 @observable isFeatureEnabled = false; 25 @observable isFeatureEnabled = true;
24 26
25 @observable isFeatureActive = false; 27 @observable isFeatureActive = false;
26 28
27 @observable isPremiumFeature = true; 29 @observable isPremiumFeature = false;
28 30
29 @observable isPremiumUpgradeRequired = true; 31 @observable isPremiumUpgradeRequired = false;
30 32
31 @observable activeWorkspace = null; 33 @observable activeWorkspace = null;
32 34
@@ -54,7 +56,8 @@ export default class WorkspacesStore extends FeatureStore {
54 } 56 }
55 57
56 @computed get isUserAllowedToUseFeature() { 58 @computed get isUserAllowedToUseFeature() {
57 return !this.isPremiumUpgradeRequired; 59 return true;
60 // return !this.isPremiumUpgradeRequired;
58 } 61 }
59 62
60 @computed get isAnyWorkspaceActive() { 63 @computed get isAnyWorkspaceActive() {
@@ -258,10 +261,10 @@ export default class WorkspacesStore extends FeatureStore {
258 }; 261 };
259 262
260 _setIsPremiumFeatureReaction = () => { 263 _setIsPremiumFeatureReaction = () => {
261 const { features } = this.stores; 264 // const { features } = this.stores;
262 const { isWorkspaceIncludedInCurrentPlan } = features.features; 265 // const { isWorkspaceIncludedInCurrentPlan } = features.features;
263 this.isPremiumFeature = !isWorkspaceIncludedInCurrentPlan; 266 // this.isPremiumFeature = !isWorkspaceIncludedInCurrentPlan;
264 this.isPremiumUpgradeRequired = !isWorkspaceIncludedInCurrentPlan; 267 // this.isPremiumUpgradeRequired = !isWorkspaceIncludedInCurrentPlan;
265 }; 268 };
266 269
267 _setWorkspaceBeingEditedReaction = () => { 270 _setWorkspaceBeingEditedReaction = () => {
@@ -326,7 +329,7 @@ export default class WorkspacesStore extends FeatureStore {
326 // Loop through all workspaces and remove invalid service ids (locally) 329 // Loop through all workspaces and remove invalid service ids (locally)
327 this.workspaces.forEach((workspace) => { 330 this.workspaces.forEach((workspace) => {
328 workspace.services.forEach((serviceId) => { 331 workspace.services.forEach((serviceId) => {
329 if (servicesHaveBeenLoaded && !services.one(serviceId)) { 332 if (servicesHaveBeenLoaded && !services.one(serviceId) && serviceId !== KEEP_WS_LOADED_USID) {
330 workspace.services.remove(serviceId); 333 workspace.services.remove(serviceId);
331 } 334 }
332 }); 335 });