feat multiselection: select multiple files and act on them

fix breadcrumb: fixed breadcrumb history not working properly when clicking on "sdcard"
fix dialogs/menus: fixed clicking out of menus and dialogs triggering actions other than hiding the dialog/event
This commit is contained in:
Mahdi Dibaiee
2015-09-05 16:09:09 +04:30
parent 39dd4903f9
commit 764554c6b9
45 changed files with 531 additions and 1867 deletions

View File

@ -21,7 +21,7 @@ export function rename(file, name) {
}
}
export function active(file) {
export function active(file = null) {
return {
type: ACTIVE_FILE,
file
@ -29,6 +29,7 @@ export function active(file) {
}
export function deleteFile(file) {
console.log('constructing deleteFile action', file);
return {
type: DELETE_FILE,
file

View File

@ -1,4 +1,4 @@
import { LIST_FILES, FILES_VIEW, REFRESH } from 'actions/types';
import { LIST_FILES, FILES_VIEW, SELECT_VIEW, REFRESH } from 'actions/types';
import store from 'store';
export function refresh() {
@ -7,23 +7,30 @@ export function refresh() {
}
}
export function toggle(state) {
export function toggle() {
return {
type: FILES_VIEW,
view: 'toggle'
}
}
export function details(state) {
export function details() {
return {
type: FILES_VIEW,
view: 'details'
}
}
export function list(state) {
export function list() {
return {
type: FILES_VIEW,
view: 'list'
}
}
export function selectView(active = true) {
return {
type: SELECT_VIEW,
active
}
}

View File

@ -3,6 +3,7 @@ const TYPES = {
LIST_FILES: Symbol('LIST_FILES'),
FILES_VIEW: Symbol('FILES_VIEW'),
SELECT_VIEW: Symbol('SELECT_VIEW'),
NAVIGATION: Symbol('NAVIGATION'),
TOGGLE: Symbol('TOGGLE'),
@ -18,7 +19,7 @@ const TYPES = {
MENU: Symbol('MENU'),
DIALOG: Symbol('DEBUG'),
DIALOG: Symbol('DIALOG'),
SETTINGS: Symbol('SETTINGS'),