Parcourir la source

fix: #860 respect popupOnStart even if the action has args.

jamesread il y a 4 mois
Parent
commit
903fd15bdb
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      frontend/resources/vue/views/ArgumentForm.vue

+ 7 - 1
frontend/resources/vue/views/ArgumentForm.vue

@@ -73,6 +73,7 @@ const confirmationChecked = ref(false)
 const hasConfirmation = ref(false)
 const hasConfirmation = ref(false)
 const formErrors = ref({})
 const formErrors = ref({})
 const actionArguments = ref([])
 const actionArguments = ref([])
+const popupOnStart = ref('')
 
 
 // Computed properties
 // Computed properties
 
 
@@ -93,6 +94,7 @@ async function setup() {
 
 
   title.value = action.title
   title.value = action.title
   icon.value = action.icon
   icon.value = action.icon
+  popupOnStart.value = action.popupOnStart || ''
   actionArguments.value = action.arguments || []
   actionArguments.value = action.arguments || []
   argValues.value = {}
   argValues.value = {}
   formErrors.value = {}
   formErrors.value = {}
@@ -418,7 +420,11 @@ async function handleSubmit(event) {
   
   
   try {
   try {
     const response = await startAction(argvs)
     const response = await startAction(argvs)
-    router.push(`/logs/${response.executionTrackingId}`)
+    if (popupOnStart.value && popupOnStart.value.includes('execution-dialog')) {
+      router.push(`/logs/${response.executionTrackingId}`)
+    } else {
+      router.back()
+    }
   } catch (err) {
   } catch (err) {
     console.error('Failed to start action:', err)
     console.error('Failed to start action:', err)
   }
   }