diff options
Diffstat (limited to 'src/features/workspaces/store.js')
-rw-r--r-- | src/features/workspaces/store.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 13227e033..5c90ff180 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -17,16 +17,18 @@ import { WORKSPACES_ROUTES } from './index'; | |||
17 | import { createReactions } from '../../stores/lib/Reaction'; | 17 | import { createReactions } from '../../stores/lib/Reaction'; |
18 | import { createActionBindings } from '../utils/ActionBinding'; | 18 | import { createActionBindings } from '../utils/ActionBinding'; |
19 | 19 | ||
20 | const debug = require('debug')('Franz:feature:workspaces:store'); | 20 | import { KEEP_WS_LOADED_USID } from '../../config'; |
21 | |||
22 | const debug = require('debug')('Ferdi:feature:workspaces:store'); | ||
21 | 23 | ||
22 | export default class WorkspacesStore extends FeatureStore { | 24 | export 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 | ||
@@ -59,7 +61,8 @@ export default class WorkspacesStore extends FeatureStore { | |||
59 | } | 61 | } |
60 | 62 | ||
61 | @computed get isUserAllowedToUseFeature() { | 63 | @computed get isUserAllowedToUseFeature() { |
62 | return !this.isPremiumUpgradeRequired; | 64 | return true; |
65 | // return !this.isPremiumUpgradeRequired; | ||
63 | } | 66 | } |
64 | 67 | ||
65 | @computed get isAnyWorkspaceActive() { | 68 | @computed get isAnyWorkspaceActive() { |
@@ -263,10 +266,10 @@ export default class WorkspacesStore extends FeatureStore { | |||
263 | }; | 266 | }; |
264 | 267 | ||
265 | _setIsPremiumFeatureReaction = () => { | 268 | _setIsPremiumFeatureReaction = () => { |
266 | const { features } = this.stores; | 269 | // const { features } = this.stores; |
267 | const { isWorkspaceIncludedInCurrentPlan } = features.features; | 270 | // const { isWorkspaceIncludedInCurrentPlan } = features.features; |
268 | this.isPremiumFeature = !isWorkspaceIncludedInCurrentPlan; | 271 | // this.isPremiumFeature = !isWorkspaceIncludedInCurrentPlan; |
269 | this.isPremiumUpgradeRequired = !isWorkspaceIncludedInCurrentPlan; | 272 | // this.isPremiumUpgradeRequired = !isWorkspaceIncludedInCurrentPlan; |
270 | }; | 273 | }; |
271 | 274 | ||
272 | _setWorkspaceBeingEditedReaction = () => { | 275 | _setWorkspaceBeingEditedReaction = () => { |
@@ -331,7 +334,7 @@ export default class WorkspacesStore extends FeatureStore { | |||
331 | // Loop through all workspaces and remove invalid service ids (locally) | 334 | // Loop through all workspaces and remove invalid service ids (locally) |
332 | this.workspaces.forEach((workspace) => { | 335 | this.workspaces.forEach((workspace) => { |
333 | workspace.services.forEach((serviceId) => { | 336 | workspace.services.forEach((serviceId) => { |
334 | if (servicesHaveBeenLoaded && !services.one(serviceId)) { | 337 | if (servicesHaveBeenLoaded && !services.one(serviceId) && serviceId !== KEEP_WS_LOADED_USID) { |
335 | workspace.services.remove(serviceId); | 338 | workspace.services.remove(serviceId); |
336 | } | 339 | } |
337 | }); | 340 | }); |