aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/store.js
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-19 19:38:56 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-19 19:40:08 +0100
commite4f1862644d5921e2ee77078c10e16efa3e58c7b (patch)
treeff7f23eb83ee974a9f719ed6f58647ce7f0a1175 /src/features/workspaces/store.js
parentfix conflicts with latest develop (diff)
downloadferdium-app-e4f1862644d5921e2ee77078c10e16efa3e58c7b.tar.gz
ferdium-app-e4f1862644d5921e2ee77078c10e16efa3e58c7b.tar.zst
ferdium-app-e4f1862644d5921e2ee77078c10e16efa3e58c7b.zip
add workspace drawer
Diffstat (limited to 'src/features/workspaces/store.js')
-rw-r--r--src/features/workspaces/store.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index a2997a0d2..1b57ba2da 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -3,7 +3,7 @@ import Store from '../../stores/lib/Store';
3import CachedRequest from '../../stores/lib/CachedRequest'; 3import CachedRequest from '../../stores/lib/CachedRequest';
4import Workspace from './models/Workspace'; 4import Workspace from './models/Workspace';
5import { matchRoute } from '../../helpers/routing-helpers'; 5import { matchRoute } from '../../helpers/routing-helpers';
6import workspaceActions from './actions'; 6import { workspaceActions } from './actions';
7 7
8const debug = require('debug')('Franz:feature:workspaces'); 8const debug = require('debug')('Franz:feature:workspaces');
9 9
@@ -55,6 +55,8 @@ export default class WorkspacesStore extends Store {
55 workspaceActions.update.listen(this._update); 55 workspaceActions.update.listen(this._update);
56 workspaceActions.activate.listen(this._setActiveWorkspace); 56 workspaceActions.activate.listen(this._setActiveWorkspace);
57 workspaceActions.deactivate.listen(this._deactivateActiveWorkspace); 57 workspaceActions.deactivate.listen(this._deactivateActiveWorkspace);
58 workspaceActions.toggleWorkspaceDrawer.listen(this._toggleWorkspaceDrawer);
59 workspaceActions.openWorkspaceSettings.listen(this._openWorkspaceSettings);
58 } 60 }
59 61
60 _getWorkspaceById = id => this.state.workspaces.find(w => w.id === id); 62 _getWorkspaceById = id => this.state.workspaces.find(w => w.id === id);
@@ -111,4 +113,12 @@ export default class WorkspacesStore extends Store {
111 @action _deactivateActiveWorkspace = () => { 113 @action _deactivateActiveWorkspace = () => {
112 this.state.activeWorkspace = null; 114 this.state.activeWorkspace = null;
113 }; 115 };
116
117 @action _toggleWorkspaceDrawer = () => {
118 this.state.isWorkspaceDrawerOpen = !this.state.isWorkspaceDrawerOpen;
119 };
120
121 @action _openWorkspaceSettings = () => {
122 this.actions.ui.openSettings({ path: 'workspaces' });
123 };
114} 124}