diff options
Diffstat (limited to 'src/features/workspaces')
-rw-r--r-- | src/features/workspaces/store.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index bb18dc182..e11513d1f 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -14,6 +14,8 @@ import { | |||
14 | updateWorkspaceRequest, | 14 | updateWorkspaceRequest, |
15 | } from './api'; | 15 | } from './api'; |
16 | import { WORKSPACES_ROUTES } from './index'; | 16 | import { WORKSPACES_ROUTES } from './index'; |
17 | import { createReactions } from '../../stores/lib/Reaction'; | ||
18 | import { createActionBindings } from '../utils/ActionBinding'; | ||
17 | 19 | ||
18 | const debug = require('debug')('Franz:feature:workspaces:store'); | 20 | const debug = require('debug')('Franz:feature:workspaces:store'); |
19 | 21 | ||
@@ -80,41 +82,39 @@ export default class WorkspacesStore extends FeatureStore { | |||
80 | 82 | ||
81 | // ACTIONS | 83 | // ACTIONS |
82 | 84 | ||
83 | this._freeUserActions = [ | 85 | this._freeUserActions = createActionBindings([ |
84 | [workspaceActions.toggleWorkspaceDrawer, this._toggleWorkspaceDrawer], | 86 | [workspaceActions.toggleWorkspaceDrawer, this._toggleWorkspaceDrawer], |
85 | [workspaceActions.openWorkspaceSettings, this._openWorkspaceSettings], | 87 | [workspaceActions.openWorkspaceSettings, this._openWorkspaceSettings], |
86 | ]; | 88 | ]); |
87 | this._premiumUserActions = [ | 89 | this._premiumUserActions = createActionBindings([ |
88 | [workspaceActions.edit, this._edit], | 90 | [workspaceActions.edit, this._edit], |
89 | [workspaceActions.create, this._create], | 91 | [workspaceActions.create, this._create], |
90 | [workspaceActions.delete, this._delete], | 92 | [workspaceActions.delete, this._delete], |
91 | [workspaceActions.update, this._update], | 93 | [workspaceActions.update, this._update], |
92 | [workspaceActions.activate, this._setActiveWorkspace], | 94 | [workspaceActions.activate, this._setActiveWorkspace], |
93 | [workspaceActions.deactivate, this._deactivateActiveWorkspace], | 95 | [workspaceActions.deactivate, this._deactivateActiveWorkspace], |
94 | ]; | 96 | ]); |
95 | this._allActions = this._freeUserActions.concat(this._premiumUserActions); | 97 | this._allActions = this._freeUserActions.concat(this._premiumUserActions); |
96 | this._registerActions(this._allActions); | 98 | this._registerActions(this._allActions); |
97 | 99 | ||
98 | // REACTIONS | 100 | // REACTIONS |
99 | 101 | ||
100 | this._freeUserReactions = [ | 102 | this._freeUserReactions = createReactions([ |
101 | this._stopPremiumActionsAndReactions, | 103 | this._stopPremiumActionsAndReactions, |
102 | this._openDrawerWithSettingsReaction, | 104 | this._openDrawerWithSettingsReaction, |
103 | this._setFeatureEnabledReaction, | 105 | this._setFeatureEnabledReaction, |
104 | this._setIsPremiumFeatureReaction, | 106 | this._setIsPremiumFeatureReaction, |
105 | this._cleanupInvalidServiceReferences, | 107 | this._cleanupInvalidServiceReferences, |
106 | ]; | 108 | ]); |
107 | this._premiumUserReactions = [ | 109 | this._premiumUserReactions = createReactions([ |
108 | this._setActiveServiceOnWorkspaceSwitchReaction, | 110 | this._setActiveServiceOnWorkspaceSwitchReaction, |
109 | this._activateLastUsedWorkspaceReaction, | 111 | this._activateLastUsedWorkspaceReaction, |
110 | this._setWorkspaceBeingEditedReaction, | 112 | this._setWorkspaceBeingEditedReaction, |
111 | ]; | 113 | ]); |
112 | this._allReactions = this._freeUserReactions.concat(this._premiumUserReactions); | 114 | this._allReactions = this._freeUserReactions.concat(this._premiumUserReactions); |
113 | 115 | ||
114 | this._registerReactions(this._allReactions); | 116 | this._registerReactions(this._allReactions); |
115 | 117 | ||
116 | console.log(this._reactions); | ||
117 | |||
118 | getUserWorkspacesRequest.execute(); | 118 | getUserWorkspacesRequest.execute(); |
119 | this.isFeatureActive = true; | 119 | this.isFeatureActive = true; |
120 | } | 120 | } |