diff --git a/client/src/components/Form/Elements/FormData/FormData.vue b/client/src/components/Form/Elements/FormData/FormData.vue index 9edf0512f758..28bddeb966da 100644 --- a/client/src/components/Form/Elements/FormData/FormData.vue +++ b/client/src/components/Form/Elements/FormData/FormData.vue @@ -9,6 +9,7 @@ import { computed, onMounted, type Ref, ref, watch } from "vue"; import { getGalaxyInstance } from "@/app"; import { useUid } from "@/composables/utils/uid"; import { type EventData, useEventStore } from "@/stores/eventStore"; +import { orList } from "@/utils/strings"; import type { DataOption } from "./types"; import { BATCH, SOURCE, VARIANTS } from "./variants"; @@ -428,6 +429,17 @@ watch( const formatsVisible = ref(false); const formatsButtonId = useUid("form-data-formats-"); + +const warningListAmount = 4; +const noOptionsWarningMessage = computed(() => { + if (!props.extensions || props.extensions.length === 0) { + return "No datasets available"; + } else if (props.extensions.length <= warningListAmount) { + return `No ${orList(props.extensions)} datasets available`; + } else { + return "No compatible datasets available"; + } +});