feat view: Enable toggle view button to toggle between grid and list views

This commit is contained in:
Mahdi Dibaiee
2015-09-09 13:28:15 +04:30
parent 49eb62ef2f
commit d56ea95e9b
10 changed files with 137 additions and 93 deletions

View File

@ -1,4 +1,4 @@
import { LIST_FILES, FILES_VIEW, SELECT_VIEW, REFRESH, SEARCH } from 'actions/types';
import { LIST_FILES, VIEW, SELECT_VIEW, REFRESH, SEARCH } from 'actions/types';
import store from 'store';
export function listFiles(files) {
@ -14,27 +14,6 @@ export function refresh() {
}
}
export function toggle() {
return {
type: FILES_VIEW,
view: 'toggle'
}
}
export function details() {
return {
type: FILES_VIEW,
view: 'details'
}
}
export function list() {
return {
type: FILES_VIEW,
view: 'list'
}
}
export function selectView(active = true) {
return {
type: SELECT_VIEW,

View File

@ -2,7 +2,6 @@ const TYPES = {
CHANGE_DIRECTORY: Symbol('CHANGE_DIRECTORY'),
LIST_FILES: Symbol('LIST_FILES'),
FILES_VIEW: Symbol('FILES_VIEW'),
SELECT_VIEW: Symbol('SELECT_VIEW'),
NAVIGATION: Symbol('NAVIGATION'),