Skip to content

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

Move folder from subfolders in the Kanban perspective (#1917)

Stanimir697871f80182
diff --git a/app/package.json b/app/package.json
index 0fee9fd5f..f9e9df187 100644
--- a/app/package.json
+++ b/app/package.json
@@ -16,7 +16,7 @@
"@tagspaces/extensions": "1.0.84"
},
"nodeDependencies": {
- "@tagspaces/tagspaces-ws": "2.1.29",
+ "@tagspaces/tagspaces-ws": "2.1.30",
"@tagspaces/extensions": "1.0.84",
"sharp": "0.31.3"
}
diff --git a/app/reducers/io-actions.ts b/app/reducers/io-actions.ts
index 5521308db..91651ee5a 100644
--- a/app/reducers/io-actions.ts
+++ b/app/reducers/io-actions.ts
@@ -102,7 +102,7 @@ const actions = {
});
return Promise.all(promises).then(() => true);
},
- moveFiles: (paths: Array<string>, targetPath: string) => (
+ moveFiles: (paths: Array<string>, targetPath: string, onProgress = undefined) => (
dispatch: (actions: Object) => Promise<boolean>
) => {
const moveJobs = paths.map(path => [
@@ -111,7 +111,7 @@ const actions = {
PlatformIO.getDirSeparator() +
extractFileName(path, PlatformIO.getDirSeparator())
]);
- return renameFilesPromise(moveJobs)
+ return renameFilesPromise(moveJobs, onProgress)
.then(() => {
dispatch(
AppActions.showNotification(i18n.t('core:filesMovedSuccessful'))
diff --git a/app/services/platform-facade.ts b/app/services/platform-facade.ts
index af83f94f4..0336a5970 100644
--- a/app/services/platform-facade.ts
+++ b/app/services/platform-facade.ts
@@ -317,11 +317,12 @@ export default class PlatformFacade {
static renameFilePromise = (
filePath: string,
- newFilePath: string
+ newFilePath: string,
+ onProgress = undefined
): Promise<any> => {
PlatformFacade.ignoreByWatcher(filePath, newFilePath);
- return platformRenameFilePromise(filePath, newFilePath).then(result => {
+ return platformRenameFilePromise(filePath, newFilePath, onProgress).then(result => {
PlatformFacade.deignoreByWatcher(filePath, newFilePath);
return result;
});
diff --git a/app/services/utils-io.ts b/app/services/utils-io.ts
index bd5fe2d56..d6e3a5069 100644
--- a/app/services/utils-io.ts
+++ b/app/services/utils-io.ts
@@ -666,11 +666,11 @@ export function deleteFilesPromise(filePathList: Array<string>) {
return Promise.all(fileDeletionPromises);
}
-export function renameFilesPromise(renameJobs: Array<Array<string>>) {
+export function renameFilesPromise(renameJobs: Array<Array<string>>, onProgress = undefined) {
return Promise.all(
renameJobs.map(async renameJob => {
try {
- return await PlatformIO.renameFilePromise(renameJob[0], renameJob[1]);
+ return await PlatformIO.renameFilePromise(renameJob[0], renameJob[1], onProgress);
} catch (err) {
console.warn('Error rename file:', err);
return false;
diff --git a/package-lock.json b/package-lock.json
index 960d7f939..5b58e93f3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,7 +22,7 @@
"@mui/styles": "5.10.15",
"@mui/x-date-pickers": "^5.0.8",
"@tagspaces/tagspaces-md": "2.1.6",
- "@tagspaces/tagspaces-platforms": "2.1.29",
+ "@tagspaces/tagspaces-platforms": "2.1.30",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",
@@ -13794,9 +13794,9 @@
}
},
"node_modules/@tagspaces/tagspaces-platforms": {
- "version": "2.1.29",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.29.tgz",
- "integrity": "sha512-/XabWAzNSjXMcWmt/upOc5MCC4KCtTCghODu6ZeYlgA4pf9HnJJ46Z3tppvPamSEk4/yZb806kn5/S1ux6RTfA==",
+ "version": "2.1.30",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.30.tgz",
+ "integrity": "sha512-zKf0TV07c6wqa9bPW2ZnXm8g7t5u1fC7olxOgSCT4LEYJBf/lzC9rB4SuqAgFXmG2GurQkNzO57kl52Z9N47eg==",
"hasInstallScript": true
},
"node_modules/@testim/chrome-version": {
@@ -59658,9 +59658,9 @@
}
},
"@tagspaces/tagspaces-platforms": {
- "version": "2.1.29",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.29.tgz",
- "integrity": "sha512-/XabWAzNSjXMcWmt/upOc5MCC4KCtTCghODu6ZeYlgA4pf9HnJJ46Z3tppvPamSEk4/yZb806kn5/S1ux6RTfA=="
+ "version": "2.1.30",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.30.tgz",
+ "integrity": "sha512-zKf0TV07c6wqa9bPW2ZnXm8g7t5u1fC7olxOgSCT4LEYJBf/lzC9rB4SuqAgFXmG2GurQkNzO57kl52Z9N47eg=="
},
"@testim/chrome-version": {
"version": "1.1.3",
diff --git a/package.json b/package.json
index 1eae090e1..a5ee8dae3 100644
--- a/package.json
+++ b/package.json
@@ -161,7 +161,7 @@
"@mui/styles": "5.10.15",
"@mui/x-date-pickers": "^5.0.8",
"@tagspaces/tagspaces-md": "2.1.6",
- "@tagspaces/tagspaces-platforms": "2.1.29",
+ "@tagspaces/tagspaces-platforms": "2.1.30",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",