diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 22:02:19 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 22:02:19 +0200 |
| commit | 5c018b3f2c2c47371546d210240836057d1ea5bb (patch) | |
| tree | 3e802344413007612b7073548756d32aa77074f4 /app/client/system/system.reducer.js | |
| parent | 2b4a6e53102b568c691c72998ddece80a3b3d515 (diff) | |
set menu dropdown from url. make pix2pix views
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 { |
