TagSpaces is an offline, open source, document manager with tagging support
Tagging folder with dnd from tag-libary remove the thumbnail (#2276)
Stanimirf00c0282b532
diff --git a/src/renderer/components/TagContainerDnd.tsx b/src/renderer/components/TagContainerDnd.tsxindex 66f9f1190..64b83fb5a 100644--- a/src/renderer/components/TagContainerDnd.tsx+++ b/src/renderer/components/TagContainerDnd.tsx@@ -98,19 +98,14 @@ const TagContainerDnd = (props: Props) => {// add from file DnD to tagGroupaddTag(tag, dropResult.tagGroupId);}- } else if (dropResult && dropResult.entryPath) {- // console.log(`Dropped item: ${item.tag.title} onto file: ${dropResult.entryPath}!`);+ } else if (dropResult && dropResult.entry) {+ // console.log(`Dropped item: ${item.tag.title} onto file: ${dropResult.entry.path}!`);if (- selectedEntries.some((entry) => entry.path === dropResult.entryPath)+ selectedEntries.some((entry) => entry.path === dropResult.entry.path)) {- /*const selectedEntryPaths = [];- selectedEntries.map((entry) => selectedEntryPaths.push(entry.path));*/addTags(selectedEntries, [item.tag]);} else {- addTags(- [currentLocation.toFsEntry(dropResult.entryPath, dropResult.isFile)],- [item.tag],- );+ addTags([dropResult.entry], [item.tag]);}}};diff --git a/src/renderer/components/TagDropContainer.tsx b/src/renderer/components/TagDropContainer.tsxindex 56c035378..b08254d00 100644--- a/src/renderer/components/TagDropContainer.tsx+++ b/src/renderer/components/TagDropContainer.tsx@@ -45,18 +45,16 @@ function TagDropContainer(props: Props) {handlerId: monitor.getHandlerId(),isActive,canDrop: monitor.canDrop(),- //selectedEntries: props.selectedEntries,- entryPath: entry?.path,- isFile: entry?.isFile,+ //entryPath: entry?.path,+ entry: entry,};},drop(item: DragItem, monitor: DropTargetMonitor) {// console.log('DROP: ', item);// console.log('DROP: ', monitor.canDrop());return {- //selectedEntries: collectedProps.selectedEntries,- entryPath: collectedProps.entryPath,- isFile: collectedProps.isFile,+ // entryPath: collectedProps.entryPath,+ entry: collectedProps.entry,};},});diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsxindex 80fac772c..e65ce9ce5 100644--- a/src/renderer/hooks/IOActionsContextProvider.tsx+++ b/src/renderer/hooks/IOActionsContextProvider.tsx@@ -307,7 +307,11 @@ export const IOActionsContextProvider = ({for (const action of actions) {if (action.action === 'add') {// reflect visibility change on new KanBan column add- if (action.entry && !action.entry.isFile) {+ if (+ action.entry &&+ !action.entry.isFile &&+ action.entry.meta?.perspective === 'kanban'+ ) {const dirPath = extractContainingDirectoryPath(action.entry.path,currentLocation?.getDirSeparator(),@@ -325,7 +329,11 @@ export const IOActionsContextProvider = ({}} else if (action.action === 'update') {// reflect visibility change on renamed KanBan column- if (action.entry && !action.entry.isFile) {+ if (+ action.entry &&+ !action.entry.isFile &&+ action.entry.meta?.perspective === 'kanban'+ ) {const dirPath = extractContainingDirectoryPath(action.entry.path,currentLocation?.getDirSeparator(),