feat setup: Setup Redux, Immutable.js and React
feat FileList: Implement File List + changedir action
This commit is contained in:
8
src/js/actions/changedir.js
Normal file
8
src/js/actions/changedir.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { CHANGE_DIRECTORY } from 'actions/types';
|
||||
|
||||
export default function changedir(dir) {
|
||||
return {
|
||||
type: CHANGE_DIRECTORY,
|
||||
dir
|
||||
};
|
||||
}
|
8
src/js/actions/list-files.js
Normal file
8
src/js/actions/list-files.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { LIST_FILES } from 'actions/types';
|
||||
|
||||
export default function listFiles(files) {
|
||||
return {
|
||||
type: LIST_FILES,
|
||||
files
|
||||
};
|
||||
}
|
9
src/js/actions/types.js
Normal file
9
src/js/actions/types.js
Normal file
@ -0,0 +1,9 @@
|
||||
const TYPES = {
|
||||
CHANGE_DIRECTORY: Symbol(),
|
||||
LIST_FILES: Symbol(),
|
||||
SORT: Symbol(),
|
||||
SEARCH: Symbol(),
|
||||
REFRESH: Symbol()
|
||||
};
|
||||
|
||||
export default TYPES;
|
Reference in New Issue
Block a user