diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 16:34:09 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 16:34:09 +0200 |
| commit | 3fbc033e37476ff03fc4ad93145976faeea47934 (patch) | |
| tree | d6472eadb3abad48711730ce8b5cc816c61c6769 /app/client/modules/samplernn/samplernn.reducer.js | |
| parent | 70551b5c0d32effb316a75d6bbe3c6807f8b4d05 (diff) | |
reload the whole page. easier
Diffstat (limited to 'app/client/modules/samplernn/samplernn.reducer.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.reducer.js | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/app/client/modules/samplernn/samplernn.reducer.js b/app/client/modules/samplernn/samplernn.reducer.js index 372b3bc..524d650 100644 --- a/app/client/modules/samplernn/samplernn.reducer.js +++ b/app/client/modules/samplernn/samplernn.reducer.js @@ -17,34 +17,63 @@ const samplernnReducer = (state = samplernnInitialState, action) => { loading: false, data: action.data, } + case types.socket.connect: return { ...state, } + case types.task.task_begin: return { ...state, } + case types.task.task_finish: return { ...state, } + + case types.folder.create: + if (action.data.module === 'samplernn') { + return { + ...state, + loading: false, + // folder: { + // ...action.data, + // input: [], + // checkpoints: [], + // output: [], + // } + } + } + return state + case types.file.create: if (state.folder.id === action.data.folder_id) { return { ...state, - files: [action.data].concat(state.files), + loading: false, + folder: { + ...state.folder, + input: [action.data].concat(state.folder.input), + }, } } return state + case types.folder.upload_complete: if (state.folder.id === action.folder) { return { ...state, - files: [action.files].concat(state.files), + loading: false, + folder: { + ...state.folder, + input: [action.data].concat(state.folder.input), + }, } } return state + case types.socket.status: return samplernnSocket(state, action.data) |
