File tree Expand file tree Collapse file tree
client/src/components/Tool Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { BDropdownItem } from "bootstrap-vue";
55import { storeToRefs } from " pinia" ;
66import { computed , ref , watch } from " vue" ;
77
8+ import { ERROR_STATES } from " @/api/jobs" ;
89import { generateTour , type TourDetails } from " @/api/tours" ;
910import { Toast } from " @/composables/toast" ;
1011import { useHistoryItemsStore } from " @/stores/historyItemsStore" ;
@@ -14,8 +15,6 @@ import { errorMessageAsString } from "@/utils/simple-error";
1415
1516import LoadingSpan from " @/components/LoadingSpan.vue" ;
1617
17- const INVALID_UPLOAD_STATES = [" discarded" , " failed" , " error" ];
18-
1918const props = defineProps <{
2019 toolId: string ;
2120 toolVersion: string ;
@@ -73,7 +72,7 @@ const allStatesOk = computed(() => {
7372
7473/** Checks if any of the states are invalid. */
7574const anyStateInvalid = computed (() => {
76- return states .value .some ((state ) => state && INVALID_UPLOAD_STATES .includes (state ));
75+ return states .value .some ((state ) => state && ERROR_STATES .includes (state ));
7776});
7877
7978const waitedForItemsOk = computed <boolean >(() => localTourData .value !== null && allStatesOk .value );
Original file line number Diff line number Diff line change @@ -70,9 +70,8 @@ const props = defineProps({
7070 type: String ,
7171 default: null ,
7272 },
73- /** Whether there will be a `FormDisplay` rendered in the default slot with all tool inputs.
74- * For now, this is used to determine if tool generated tours can be offered. */
75- hasCompleteInputs: {
73+ /** If tool generated tours can be offered. */
74+ allowGeneratedTours: {
7675 type: Boolean ,
7776 default: false ,
7877 },
@@ -126,8 +125,8 @@ function onUpdatePreferredObjectStoreId(selectedToolPreferredObjectStoreId) {
126125
127126const showHelpForum = computed (() => isConfigLoaded .value && config .value .enable_help_forum_tool_panel_integration );
128127
129- const allowGeneratedTours = computed (() =>
130- Boolean (props .hasCompleteInputs && isConfigLoaded .value && config .value .enable_tool_generated_tours ),
128+ const canGenerateTours = computed (() =>
129+ Boolean (props .allowGeneratedTours && isConfigLoaded .value && config .value .enable_tool_generated_tours ),
131130);
132131< / script>
133132
@@ -147,7 +146,7 @@ const allowGeneratedTours = computed(() =>
147146 @onChangeVersion= " onChangeVersion" / >
148147 < ToolOptionsButton
149148 : id= " props.id"
150- : allow- generated- tours= " allowGeneratedTours "
149+ : allow- generated- tours= " canGenerateTours "
151150 : tool- uuid= " props.toolUuid"
152151 : sharable- url= " props.options.sharable_url"
153152 : version= " props.version"
Original file line number Diff line number Diff line change 3636 :disabled =" disabled || showExecuting"
3737 :allow-object-store-selection =" config.object_store_allows_id_selection"
3838 :preferred-object-store-id =" preferredObjectStoreId"
39- has-complete-inputs
39+ allow-generated-tours
4040 itemscope =" itemscope"
4141 itemtype =" https://schema.org/CreativeWork"
4242 @updatePreferredObjectStoreId =" onUpdatePreferredObjectStoreId"
You can’t perform that action at this time.
0 commit comments