Inline
This commit is contained in:
parent
8ee9b2be32
commit
ab95b4daee
|
@ -209,6 +209,7 @@ export default function Uploader({
|
||||||
setChoiceModalView(false);
|
setChoiceModalView(false);
|
||||||
uploadRunning.current = false;
|
uploadRunning.current = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCollectionSelectorCancel = () => {
|
const handleCollectionSelectorCancel = () => {
|
||||||
uploadRunning.current = false;
|
uploadRunning.current = false;
|
||||||
};
|
};
|
||||||
|
@ -234,6 +235,7 @@ export default function Uploader({
|
||||||
publicCollectionGalleryContext,
|
publicCollectionGalleryContext,
|
||||||
appContext.isCFProxyDisabled,
|
appContext.isCFProxyDisabled,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (uploadManager.isUploadRunning()) {
|
if (uploadManager.isUploadRunning()) {
|
||||||
setUploadProgressView(true);
|
setUploadProgressView(true);
|
||||||
}
|
}
|
||||||
|
@ -709,28 +711,19 @@ export default function Uploader({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUploadToSingleCollection = () => {
|
const didSelectCollectionMapping = (mapping: CollectionMapping) => {
|
||||||
|
switch (mapping) {
|
||||||
|
case "root":
|
||||||
uploadToSingleNewCollection(importSuggestion.rootFolderName);
|
uploadToSingleNewCollection(importSuggestion.rootFolderName);
|
||||||
};
|
break;
|
||||||
|
case "parent":
|
||||||
const handleUploadToMultipleCollections = () => {
|
|
||||||
if (importSuggestion.hasRootLevelFileWithFolder) {
|
if (importSuggestion.hasRootLevelFileWithFolder) {
|
||||||
appContext.setDialogMessage(
|
appContext.setDialogMessage(
|
||||||
getRootLevelFileWithFolderNotAllowMessage(),
|
getRootLevelFileWithFolderNotAllowMessage(),
|
||||||
);
|
);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
uploadFilesToNewCollections("parent");
|
uploadFilesToNewCollections("parent");
|
||||||
};
|
}
|
||||||
|
|
||||||
const didSelectCollectionMapping = (mapping: CollectionMapping) => {
|
|
||||||
switch (mapping) {
|
|
||||||
case "root":
|
|
||||||
handleUploadToSingleCollection();
|
|
||||||
break;
|
|
||||||
case "parent":
|
|
||||||
handleUploadToMultipleCollections();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue