From 0d739cd26d3b18d1456444e9ddf7e71d84e40253 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 9 May 2022 22:23:30 -0700 Subject: [PATCH] New: Don't default manual import to move Closes #5005 --- .../Interactive/InteractiveImportModalContent.js | 1 + .../Interactive/InteractiveImportModalContentConnector.js | 5 +++++ frontend/src/Store/Actions/interactiveImportActions.js | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js index dd4d1ab49..f08a85413 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js @@ -94,6 +94,7 @@ const filterExistingFilesOptions = { }; const importModeOptions = [ + { key: 'chooseImportMode', value: 'Choose Import Mode', disabled: true }, { key: 'move', value: 'Move Files' }, { key: 'copy', value: 'Hardlink/Copy Files' } ]; diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js index f912fa9a3..292a2becd 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js @@ -178,6 +178,11 @@ class InteractiveImportModalContentConnector extends Component { const existingFiles = []; const files = []; + if (importMode === 'chooseImportMethod') { + this.setState({ interactiveImportErrorMessage: 'An import mode must be selected' }); + return; + } + items.forEach((item) => { const isSelected = selected.indexOf(item.id) > -1; diff --git a/frontend/src/Store/Actions/interactiveImportActions.js b/frontend/src/Store/Actions/interactiveImportActions.js index 132355a16..a1ec85595 100644 --- a/frontend/src/Store/Actions/interactiveImportActions.js +++ b/frontend/src/Store/Actions/interactiveImportActions.js @@ -34,7 +34,7 @@ export const defaultState = { sortKey: 'quality', sortDirection: sortDirections.DESCENDING, recentFolders: [], - importMode: 'move', + importMode: 'chooseImportMode', sortPredicates: { relativePath: function(item, direction) { const relativePath = item.relativePath;