From 2664eb3e474f5d03d1782c15673b774d68fb2c58 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 28 May 2018 13:06:54 +0200 Subject: textInput/fileUpload --- app/client/system/system.actions.js | 4 ++++ app/client/system/system.reducer.js | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'app/client/system') diff --git a/app/client/system/system.actions.js b/app/client/system/system.actions.js index 519e140..4c5f98e 100644 --- a/app/client/system/system.actions.js +++ b/app/client/system/system.actions.js @@ -5,3 +5,7 @@ export const run = (cmd) => { socket.system.run_system_command(cmd) return { type: types.system.running_command, cmd } } + +export const changeTool = (tool) => { + return { type: types.app.change_tool, tool } +} \ No newline at end of file diff --git a/app/client/system/system.reducer.js b/app/client/system/system.reducer.js index f945a65..fe3d9e3 100644 --- a/app/client/system/system.reducer.js +++ b/app/client/system/system.reducer.js @@ -9,6 +9,9 @@ const systemInitialState = { site: { name: 'Lens Cortex', }, + app: { + tool: 'samplernn', + }, server: { connected: false, status: "disconnected", @@ -179,6 +182,14 @@ const systemReducer = (state = systemInitialState, action) => { [action.task.processor]: { status: 'IDLE', task: {} }, }, } + case types.app.change_tool: + return { + ...state, + app: { + ...state.app, + tool: action.tool, + } + } case types.system.stdout: return { ...state, -- cgit v1.2.3-70-g09d2