diff options
Diffstat (limited to 'app/client/system/system.reducer.js')
| -rw-r--r-- | app/client/system/system.reducer.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/client/system/system.reducer.js b/app/client/system/system.reducer.js index 5067acd..d83fa21 100644 --- a/app/client/system/system.reducer.js +++ b/app/client/system/system.reducer.js @@ -43,6 +43,8 @@ const systemInitialState = { stderr: "", } +import modules from '../modules' + const systemReducer = (state = systemInitialState, action) => { let processor = null switch(action.type) { @@ -130,9 +132,18 @@ const systemReducer = (state = systemInitialState, action) => { } case types.system.load_site: document.querySelector('title').innerHTML = action.site.name + '.cortex' + let tool = state.site.tool + const path = window.location.pathname.split('/')[1] + if (path in modules) { + tool = path + } return { ...state, site: action.site, + app: { + ...state.app, + tool: tool, + } } case types.system.running_command: return { |
