Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Fixing file moving issue #1017

Ilian Sapundshievd9c694f58b80
diff --git a/app/perspectives/grid-perspective/components/CellContent.js b/app/perspectives/grid-perspective/components/CellContent.js
index 8d78847af..2d8092d9d 100644
--- a/app/perspectives/grid-perspective/components/CellContent.js
+++ b/app/perspectives/grid-perspective/components/CellContent.js
@@ -36,7 +36,6 @@ import {
} from '../../../services/utils-io';
import TagContainerDnd from '../../../components/TagContainerDnd';
import TagContainer from '../../../components/TagContainer';
-import TagDropContainer from '../../../components/TagDropContainer';
import AppConfig from '../../../config';
import i18n from '../../../services/i18n';
import { type Tag } from '../../../reducers/taglibrary';
@@ -310,25 +309,23 @@ const CellContent = (props: Props) => {
}
return (
- <TagDropContainer entryPath={fsEntry.path}>
- <Paper
- elevation={2}
- data-entry-id={fsEntry.uuid}
- className={classNames(
- layoutType === 'grid' && classes.gridCell,
- layoutType === 'row' && classes.rowCell,
- selected && layoutType === 'grid' && classes.selectedGridCell,
- selected && layoutType === 'row' && classes.selectedRowCell
- )}
- style={{
- minHeight: layoutType === 'row' ? entryHeight : 'auto',
- backgroundColor: theme.palette.background.default
- }}
- onContextMenu={event => handleGridContextMenu(event, fsEntry)}
- onDoubleClick={event => handleGridCellDblClick(event, fsEntry)}
- onClick={event => handleGridCellClick(event, fsEntry)}
- >{gridCell}</Paper>
- </TagDropContainer>
+ <Paper
+ elevation={2}
+ data-entry-id={fsEntry.uuid}
+ className={classNames(
+ layoutType === 'grid' && classes.gridCell,
+ layoutType === 'row' && classes.rowCell,
+ selected && layoutType === 'grid' && classes.selectedGridCell,
+ selected && layoutType === 'row' && classes.selectedRowCell
+ )}
+ style={{
+ minHeight: layoutType === 'row' ? entryHeight : 'auto',
+ backgroundColor: theme.palette.background.default
+ }}
+ onContextMenu={event => handleGridContextMenu(event, fsEntry)}
+ onDoubleClick={event => handleGridCellDblClick(event, fsEntry)}
+ onClick={event => handleGridCellClick(event, fsEntry)}
+ >{gridCell}</Paper>
);
};
diff --git a/app/perspectives/grid-perspective/components/MainContainer.js b/app/perspectives/grid-perspective/components/MainContainer.js
index 9ee6dff56..d5abcb975 100644
--- a/app/perspectives/grid-perspective/components/MainContainer.js
+++ b/app/perspectives/grid-perspective/components/MainContainer.js
@@ -74,6 +74,7 @@ import TargetMoveFileBox from '../../../components/TargetMoveFileBox';
import FileSourceDnd from '../../../components/FileSourceDnd';
import AppConfig from '../../../config';
import DragItemTypes from '../../../components/DragItemTypes';
+import TagDropContainer from '../../../components/TagDropContainer';
import IOActions from '../../../reducers/io-actions';
import {
actions as AppActions,
@@ -589,23 +590,25 @@ class GridPerspective extends React.Component<Props, State> {
}
const cellContent = (
- <CellContent
- selected={selected}
- fsEntry={fsEntry}
- entrySize={entrySize}
- classes={classes}
- theme={theme}
- supportedFileTypes={supportedFileTypes}
- thumbnailMode={thumbnailMode}
- addTags={addTags}
- selectedEntries={selectedEntries}
- isReadOnlyMode={this.props.isReadOnlyMode}
- handleTagMenu={this.handleTagMenu}
- layoutType={layoutType}
- handleGridContextMenu={this.handleGridContextMenu}
- handleGridCellDblClick={this.handleGridCellDblClick}
- handleGridCellClick={this.handleGridCellClick}
- />
+ <TagDropContainer entryPath={fsEntry.path}>
+ <CellContent
+ selected={selected}
+ fsEntry={fsEntry}
+ entrySize={entrySize}
+ classes={classes}
+ theme={theme}
+ supportedFileTypes={supportedFileTypes}
+ thumbnailMode={thumbnailMode}
+ addTags={addTags}
+ selectedEntries={selectedEntries}
+ isReadOnlyMode={this.props.isReadOnlyMode}
+ handleTagMenu={this.handleTagMenu}
+ layoutType={layoutType}
+ handleGridContextMenu={this.handleGridContextMenu}
+ handleGridCellDblClick={this.handleGridCellDblClick}
+ handleGridCellClick={this.handleGridCellClick}
+ />
+ </TagDropContainer>
);