From b2e2053431717d20aec5600c2e15493055a23939 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sun, 22 Dec 2024 14:28:23 -0500 Subject: [PATCH] Don't show upload files option when selecting datasets. --- .../Collections/ListCollectionCreator.vue | 1 + .../Collections/PairCollectionCreator.vue | 1 + .../PairedListCollectionCreator.vue | 1 + .../Collections/common/CollectionCreator.vue | 118 ++++++++++++------ 4 files changed, 82 insertions(+), 39 deletions(-) diff --git a/client/src/components/Collections/ListCollectionCreator.vue b/client/src/components/Collections/ListCollectionCreator.vue index ca9e25aec416..d33f98927d83 100644 --- a/client/src/components/Collections/ListCollectionCreator.vue +++ b/client/src/components/Collections/ListCollectionCreator.vue @@ -414,6 +414,7 @@ function renameElement(element: any, name: string) { :extensions="extensions" collection-type="list" :no-items="props.initialElements.length == 0 && !props.fromSelection" + :show-upload="!fromSelection" @add-uploaded-files="addUploadedFiles" @on-update-datatype-toggle="changeDatatypeFilter" @onUpdateHideSourceItems="onUpdateHideSourceItems" diff --git a/client/src/components/Collections/PairCollectionCreator.vue b/client/src/components/Collections/PairCollectionCreator.vue index 1d3e5922f315..c00c2c0f9b1e 100644 --- a/client/src/components/Collections/PairCollectionCreator.vue +++ b/client/src/components/Collections/PairCollectionCreator.vue @@ -376,6 +376,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { :extensions-toggle="removeExtensions" collection-type="paired" :no-items="props.initialElements.length == 0 && !props.fromSelection" + :show-upload="!fromSelection" @add-uploaded-files="addUploadedFiles" @onUpdateHideSourceItems="onUpdateHideSourceItems" @clicked-create="clickedCreate" diff --git a/client/src/components/Collections/PairedListCollectionCreator.vue b/client/src/components/Collections/PairedListCollectionCreator.vue index 620252f7c281..1f831e66a79c 100644 --- a/client/src/components/Collections/PairedListCollectionCreator.vue +++ b/client/src/components/Collections/PairedListCollectionCreator.vue @@ -881,6 +881,7 @@ function _naiveStartingAndEndingLCS(s1: string, s2: string) { :extensions="extensions" collection-type="list:paired" :no-items="props.initialElements.length == 0 && !props.fromSelection" + :show-upload="!fromSelection" @add-uploaded-files="addUploadedFiles" @onUpdateHideSourceItems="hideSourceItems = $event" @clicked-create="clickedCreate" diff --git a/client/src/components/Collections/common/CollectionCreator.vue b/client/src/components/Collections/common/CollectionCreator.vue index 06e2ec892eea..b43bbd5574dc 100644 --- a/client/src/components/Collections/common/CollectionCreator.vue +++ b/client/src/components/Collections/common/CollectionCreator.vue @@ -46,12 +46,14 @@ interface Props { extensionsToggle?: boolean; noItems?: boolean; collectionType?: string; + showUpload: boolean; } const props = withDefaults(defineProps(), { suggestedName: "", extensions: undefined, extensionsToggle: false, + showUpload: true, }); const emit = defineEmits<{ @@ -151,8 +153,8 @@ watch(