|
131 | 131 | :class="[ |
132 | 132 | { 'cursor-default': isDataChanged }, |
133 | 133 | workflow.testingMode |
134 | | - ? 'bg-primary bg-primary bg-opacity-20 text-primary' |
| 134 | + ? 'bg-primary bg-opacity-20 text-primary' |
135 | 135 | : 'hoverable', |
136 | 136 | ]" |
137 | 137 | class="rounded-lg p-2" |
@@ -333,6 +333,7 @@ import { useToast } from 'vue-toastification'; |
333 | 333 | import browser from 'webextension-polyfill'; |
334 | 334 | import { fetchApi } from '@/utils/api'; |
335 | 335 | import { useUserStore } from '@/stores/user'; |
| 336 | +import { useStore } from '@/stores/main'; |
336 | 337 | import { useWorkflowStore } from '@/stores/workflow'; |
337 | 338 | import { useTeamWorkflowStore } from '@/stores/teamWorkflow'; |
338 | 339 | import { useSharedWorkflowStore } from '@/stores/sharedWorkflow'; |
@@ -381,6 +382,7 @@ const { t } = useI18n(); |
381 | 382 | const toast = useToast(); |
382 | 383 | const router = useRouter(); |
383 | 384 | const dialog = useDialog(); |
| 385 | +const mainStore = useStore(); |
384 | 386 | const userStore = useUserStore(); |
385 | 387 | const packageStore = usePackageStore(); |
386 | 388 | const workflowStore = useWorkflowStore(); |
@@ -468,6 +470,11 @@ function updateWorkflowDescription(value) { |
468 | 470 | state.showEditDescription = false; |
469 | 471 | } |
470 | 472 | function executeCurrWorkflow() { |
| 473 | + if (mainStore.settings.editor.saveWhenExecute && props.isDataChanged) { |
| 474 | + // eslint-disable-next-line no-use-before-define |
| 475 | + saveWorkflow(); |
| 476 | + } |
| 477 | +
|
471 | 478 | executeWorkflow({ |
472 | 479 | ...props.workflow, |
473 | 480 | isTesting: props.isDataChanged, |
|
0 commit comments