From e4f1862644d5921e2ee77078c10e16efa3e58c7b Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Tue, 19 Mar 2019 19:38:56 +0100 Subject: add workspace drawer --- src/features/workspaces/store.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/features/workspaces/store.js') 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'; import CachedRequest from '../../stores/lib/CachedRequest'; import Workspace from './models/Workspace'; import { matchRoute } from '../../helpers/routing-helpers'; -import workspaceActions from './actions'; +import { workspaceActions } from './actions'; const debug = require('debug')('Franz:feature:workspaces'); @@ -55,6 +55,8 @@ export default class WorkspacesStore extends Store { workspaceActions.update.listen(this._update); workspaceActions.activate.listen(this._setActiveWorkspace); workspaceActions.deactivate.listen(this._deactivateActiveWorkspace); + workspaceActions.toggleWorkspaceDrawer.listen(this._toggleWorkspaceDrawer); + workspaceActions.openWorkspaceSettings.listen(this._openWorkspaceSettings); } _getWorkspaceById = id => this.state.workspaces.find(w => w.id === id); @@ -111,4 +113,12 @@ export default class WorkspacesStore extends Store { @action _deactivateActiveWorkspace = () => { this.state.activeWorkspace = null; }; + + @action _toggleWorkspaceDrawer = () => { + this.state.isWorkspaceDrawerOpen = !this.state.isWorkspaceDrawerOpen; + }; + + @action _openWorkspaceSettings = () => { + this.actions.ui.openSettings({ path: 'workspaces' }); + }; } -- cgit v1.2.3-54-g00ecf