1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/* 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 = (cb) => ({
type: 'CREATE_TASK',
cb
})
export const addTask = (task) => ({
type: 'ADD_TASK',
task,
})
export const updateTask = (task) => ({
type: 'UPDATE_TASK',
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 initNewFolder = () => ({
type: 'INIT_NEW_FOLDER'
})
export const cancelNewFolder = () => ({
type: 'CANCEL_NEW_FOLDER'
})
export const createNewFolder = (name, cb) => ({
type: 'CREATE_NEW_FOLDER',
name,
cb
})
export const openFolder = (folder, cb) => ({
type: 'OPEN_FOLDER',
folder,
cb
})
export const closeFolder = (folder) => ({
type: 'CLOSE_FOLDER',
folder,
})
export const addFolder = (folder) => ({
type: 'ADD_FOLDER',
folder,
})
export const addFile = (file) => ({
type: 'ADD_FILE',
file,
})
export const addFiles = (files) => ({
type: 'ADD_FILES',
files,
})
export const updateFile = (file) => ({
type: 'UPDATE_FILE',
file,
})
|