diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-07-07 21:18:33 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-07-07 21:18:33 +0200 |
| commit | f8b61281be84a6e4e7a44be5109e688a7c56c671 (patch) | |
| tree | 43797c6b6cfa5c0f89c020f8c89e0da10f791a55 /client/actions | |
| parent | 3d3a7b80d34c100846c8ae130b424b63ba3c0784 (diff) | |
refactor files so list updates while processing
Diffstat (limited to 'client/actions')
| -rw-r--r-- | client/actions/index.js | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/client/actions/index.js b/client/actions/index.js index 0a163ae..fda5a4a 100644 --- a/client/actions/index.js +++ b/client/actions/index.js @@ -1,31 +1,68 @@ +/* AudioPlayer */ + export const audioPlayFile = (file) => ({ type: 'AUDIO_PLAY_FILE', file: file }) - export const audioPause = () => ({ type: 'AUDIO_PAUSE', }) +/* currentTask */ + export const setContent = (content) => ({ type: 'SET_CONTENT', file: content }) - export const setStyle = (style) => ({ type: 'SET_STYLE', file: style }) - export const setAlpha = (alpha) => ({ type: 'SET_ALPHA', alpha, }) - export const createTask = () => ({ type: 'CREATE_TASK', }) - export const addTask = () => ({ type: 'ADD_TASK', }) + +/* tasks */ + +export const loadTasks = (tasks) => ({ + type: 'LOAD_TASKS', + tasks, +}) + +/* folders */ + +export const loadFolders = (folders) => ({ + type: 'LOAD_FOLDERS', + folders, +}) +export const loadFiles = (files) => ({ + type: 'LOAD_FILES', + files, +}) +export const loadOpenFolders = (folders) => ({ + type: 'LOAD_OPEN_FOLDERS', + folders, +}) +export const openFolder = (folder) => ({ + type: 'OPEN_FOLDER', + folder, +}) +export const closeFolder = (folder) => ({ + type: 'CLOSE_FOLDER', + folder, +}) +export const addFolder = (folder) => ({ + type: 'ADD_FOLDER', + folder, +}) +export const updateFile = (file) => ({ + type: 'UPDATE_FILE', + file, +}) |
