TagSpaces is an offline, open source, document manager with tagging support
fix Move many files from local folder to subfolder on the same level - change in the default perspectiv
stanimirdcb599d388e9
diff --git a/app/components/LocationManager.tsx b/app/components/LocationManager.tsxindex 8ea554776..45eae4773 100644--- a/app/components/LocationManager.tsx+++ b/app/components/LocationManager.tsx@@ -622,7 +622,8 @@ class LocationManager extends React.Component<Props, State> {console.log('Dropped files: ' + path);if (targetLocationType === locationType.TYPE_CLOUD) {this.props.uploadFiles(arrPath, targetPath);- } else { //if (targetLocationType === locationType.TYPE_LOCAL) {+ } else {+ //if (targetLocationType === locationType.TYPE_LOCAL) {this.props.moveFiles(arrPath, targetPath);}this.props.setSelectedEntries([]);@@ -635,8 +636,13 @@ class LocationManager extends React.Component<Props, State> {// @ts-ignoreaccepts={[DragItemTypes.FILE]}onDrop={this.handleFileMoveDrop}- path={props.children[0]._owner.key}- // locationType={location.type}+ path={+ //TODO rethink this its not reliable to get path like that (try Picture)+ props.children[0] !== undefined+ ? props.children[0]._owner.key+ : undefined+ }+ // locationType={location.type}>{props.children}</TargetMoveFileBox>diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex 6c5900bde..ec26f9743 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -557,9 +557,18 @@ class GridPerspective extends React.Component<Props, State> {return;}if (monitor) {- const { path } = monitor.getItem();+ const { path, selectedEntries } = monitor.getItem();+ const arrPath = [];+ if (selectedEntries && selectedEntries.length > 0) {+ selectedEntries.map(entry => {+ arrPath.push(entry.path);+ return true;+ });+ } else {+ arrPath.push(path);+ }console.log('Dropped files: ' + path);- this.props.moveFiles([path], item.children.props.entryPath);+ this.props.moveFiles(arrPath, item.path);}};@@ -632,6 +641,7 @@ class GridPerspective extends React.Component<Props, State> {<TargetMoveFileBox// @ts-ignoreaccepts={[DragItemTypes.FILE]}+ path={fsEntry.path}onDrop={this.handleFileMoveDrop}>{cellContent}