From 45373f655f68fdd0b320cde175b6108454ad4731 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 17 Jul 2021 20:32:22 +0530 Subject: Removed Franz paid plans features: - serviceLimit - planSelection - trialStatusBar and other Franz features that were for different tiers of subscription. --- src/features/workspaces/store.js | 47 ++-------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'src/features/workspaces/store.js') diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 632f3c299..8c73516bc 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js @@ -22,10 +22,6 @@ export default class WorkspacesStore extends FeatureStore { @observable isFeatureActive = false; - @observable isPremiumFeature = false; - - @observable isPremiumUpgradeRequired = false; - @observable activeWorkspace = null; @observable nextWorkspace = null; @@ -58,7 +54,6 @@ export default class WorkspacesStore extends FeatureStore { @computed get isUserAllowedToUseFeature() { return true; - // return !this.isPremiumUpgradeRequired; } @computed get isAnyWorkspaceActive() { @@ -69,16 +64,8 @@ export default class WorkspacesStore extends FeatureStore { _wasDrawerOpenBeforeSettingsRoute = null; - _freeUserActions = []; - - _premiumUserActions = []; - _allActions = []; - _freeUserReactions = []; - - _premiumUserReactions = []; - _allReactions = []; // ========== PUBLIC API ========= // @@ -90,11 +77,9 @@ export default class WorkspacesStore extends FeatureStore { // ACTIONS - this._freeUserActions = createActionBindings([ + this._allActions = createActionBindings([ [workspaceActions.toggleWorkspaceDrawer, this._toggleWorkspaceDrawer], [workspaceActions.openWorkspaceSettings, this._openWorkspaceSettings], - ]); - this._premiumUserActions = createActionBindings([ [workspaceActions.edit, this._edit], [workspaceActions.create, this._create], [workspaceActions.delete, this._delete], @@ -106,27 +91,18 @@ export default class WorkspacesStore extends FeatureStore { this._toggleKeepAllWorkspacesLoadedSetting, ], ]); - this._allActions = this._freeUserActions.concat(this._premiumUserActions); this._registerActions(this._allActions); // REACTIONS - this._freeUserReactions = createReactions([ - this._disablePremiumFeatures, + this._allReactions = createReactions([ this._openDrawerWithSettingsReaction, this._setFeatureEnabledReaction, - this._setIsPremiumFeatureReaction, this._cleanupInvalidServiceReferences, - ]); - this._premiumUserReactions = createReactions([ this._setActiveServiceOnWorkspaceSwitchReaction, this._activateLastUsedWorkspaceReaction, this._setWorkspaceBeingEditedReaction, ]); - this._allReactions = this._freeUserReactions.concat( - this._premiumUserReactions, - ); - this._registerReactions(this._allReactions); getUserWorkspacesRequest.execute(); @@ -273,13 +249,6 @@ export default class WorkspacesStore extends FeatureStore { this.isFeatureEnabled = isWorkspaceEnabled; }; - _setIsPremiumFeatureReaction = () => { - // const { features } = this.stores; - // const { isWorkspaceIncludedInCurrentPlan } = features.features; - // this.isPremiumFeature = !isWorkspaceIncludedInCurrentPlan; - // this.isPremiumUpgradeRequired = !isWorkspaceIncludedInCurrentPlan; - }; - _setWorkspaceBeingEditedReaction = () => { const { pathname } = this.stores.router.location; const match = matchRoute('/settings/workspaces/edit/:id', pathname); @@ -357,16 +326,4 @@ export default class WorkspacesStore extends FeatureStore { }); }); }; - - _disablePremiumFeatures = () => { - if (!this.isUserAllowedToUseFeature) { - debug('_disablePremiumFeatures'); - this._stopActions(this._premiumUserActions); - this._stopReactions(this._premiumUserReactions); - this.reset(); - } else { - this._startActions(this._premiumUserActions); - this._startReactions(this._premiumUserReactions); - } - }; } -- cgit v1.2.3-54-g00ecf