aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/store.js
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-12 15:51:57 +0200
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-04-12 15:52:55 +0200
commit76bf7b840ea7d607a21b0294d10be01b26ad0607 (patch)
tree05b15350fa8cf00972ae8caab812868b9fa9dfe0 /src/features/workspaces/store.js
parentalign announcement and spotlight (diff)
downloadferdium-app-76bf7b840ea7d607a21b0294d10be01b26ad0607.tar.gz
ferdium-app-76bf7b840ea7d607a21b0294d10be01b26ad0607.tar.zst
ferdium-app-76bf7b840ea7d607a21b0294d10be01b26ad0607.zip
merge-in latest develop
Diffstat (limited to 'src/features/workspaces/store.js')
-rw-r--r--src/features/workspaces/store.js20
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';
16import { WORKSPACES_ROUTES } from './index'; 16import { WORKSPACES_ROUTES } from './index';
17import { createReactions } from '../../stores/lib/Reaction';
18import { createActionBindings } from '../utils/ActionBinding';
17 19
18const debug = require('debug')('Franz:feature:workspaces:store'); 20const 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 }