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:
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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'),
|
||||
|
||||
|
Reference in New Issue
Block a user