|
15 | 15 | @onRefactor="onRefactor" |
16 | 16 | @onShow="hideModal" /> |
17 | 17 | <MessagesModal :title="messageTitle" :message="messageBody" :error="messageIsError" @onHidden="resetMessage" /> |
18 | | - <SaveChangesModal :nav-url.sync="navUrl" :show-modal.sync="showSaveChangesModal" @on-proceed="onNavigate" /> |
| 18 | + <SaveChangesModal |
| 19 | + :append-version="saveChangesAppendVersion" |
| 20 | + :nav-url="navUrl" |
| 21 | + :show-modal.sync="showSaveChangesModal" |
| 22 | + @on-proceed="onNavigate" /> |
19 | 23 | <GModal |
20 | 24 | :show.sync="showSaveAsModal" |
21 | 25 | confirm |
|
39 | 43 | :default-activities="workflowActivities" |
40 | 44 | :special-activities="specialWorkflowActivities" |
41 | 45 | :exit-activity="exitWorkflowActivity" |
| 46 | + :run-activity="runWorkflowActivity" |
42 | 47 | activity-bar-id="workflow-editor" |
43 | 48 | :show-admin="false" |
44 | 49 | options-title="Options" |
|
48 | 53 | initial-activity="workflow-editor-attributes" |
49 | 54 | :options-icon="faCog" |
50 | 55 | :hide-panel="reportActive" |
| 56 | + :header-icon="faSitemap" |
| 57 | + header-title="Editor" |
51 | 58 | @activityClicked="onActivityClicked"> |
52 | 59 | <template v-slot:side-panel="{ isActiveSideBar }"> |
53 | 60 | <ToolPanel v-if="isActiveSideBar('workflow-editor-tools')" workflow @onInsertTool="onInsertTool" /> |
|
116 | 123 | ref="markdownEditor" |
117 | 124 | :markdown-text="report.markdown" |
118 | 125 | mode="report" |
119 | | - :title="'Workflow Report: ' + name" |
| 126 | + :title="'Workflow Report Template: ' + name" |
120 | 127 | :labels="getLabels" |
121 | 128 | :steps="steps" |
122 | 129 | @insert="insertMarkdown" |
|
181 | 188 | variant="secondary" |
182 | 189 | :disabled="!undoRedoStore.hasUndo" |
183 | 190 | @click="undoRedoStore.undo()"> |
184 | | - <FontAwesomeIcon :icon="faArrowLeft" /> |
| 191 | + <FontAwesomeIcon :icon="faUndo" /> |
185 | 192 | </b-button> |
186 | 193 | <b-button |
187 | 194 | :title="undoRedoStore.redoText + ' (Ctrl + Shift + Z)'" |
188 | 195 | variant="secondary" |
189 | 196 | :disabled="!undoRedoStore.hasRedo" |
190 | 197 | @click="undoRedoStore.redo()"> |
191 | | - <FontAwesomeIcon :icon="faArrowRight" /> |
| 198 | + <FontAwesomeIcon :icon="faRedo" /> |
192 | 199 | </b-button> |
193 | 200 | <b-button |
194 | 201 | id="workflow-save-button" |
|
247 | 254 | </template> |
248 | 255 |
|
249 | 256 | <script> |
250 | | -import { faArrowLeft, faArrowRight, faCog, faKey, faSave, faTimes, faWrench } from "@fortawesome/free-solid-svg-icons"; |
| 257 | +import { faCog, faKey, faRedo, faSave, faSitemap, faTimes, faUndo, faWrench } from "@fortawesome/free-solid-svg-icons"; |
251 | 258 | import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; |
252 | 259 | import { until, whenever } from "@vueuse/core"; |
253 | 260 | import { logicAnd, logicNot, logicOr } from "@vueuse/math"; |
@@ -610,9 +617,8 @@ export default { |
610 | 617 | const isNewTempWorkflow = computed(() => !props.workflowId); |
611 | 618 | const lintData = useLintData(id, steps, datatypesMapper, annotation, readme, license, creator); |
612 | 619 |
|
613 | | - const { specialWorkflowActivities, exitWorkflowActivity } = useSpecialWorkflowActivities( |
| 620 | + const { specialWorkflowActivities, exitWorkflowActivity, runWorkflowActivity } = useSpecialWorkflowActivities( |
614 | 621 | computed(() => ({ |
615 | | - hasInvalidConnections: hasInvalidConnections.value, |
616 | 622 | lintData: lintData, |
617 | 623 | })), |
618 | 624 | ); |
@@ -716,13 +722,15 @@ export default { |
716 | 722 | insertMarkdown, |
717 | 723 | specialWorkflowActivities, |
718 | 724 | exitWorkflowActivity, |
| 725 | + runWorkflowActivity, |
719 | 726 | isNewTempWorkflow, |
720 | 727 | saveWorkflowTitle, |
721 | 728 | confirm, |
722 | 729 | inputs, |
723 | 730 | workflowActivities, |
724 | 731 | faKey, |
725 | 732 | faWrench, |
| 733 | + faSitemap, |
726 | 734 | showDropdown: false, |
727 | 735 | lintData, |
728 | 736 | onHighlightRegion, |
@@ -754,12 +762,13 @@ export default { |
754 | 762 | graphOffset: { left: 0, top: 0, width: 0, height: 0 }, |
755 | 763 | debounceTimer: null, |
756 | 764 | showSaveChangesModal: false, |
| 765 | + saveChangesAppendVersion: false, |
757 | 766 | navUrl: "", |
758 | | - faArrowLeft, |
759 | | - faArrowRight, |
760 | 767 | faTimes, |
761 | 768 | faCog, |
762 | 769 | faSave, |
| 770 | + faRedo, |
| 771 | + faUndo, |
763 | 772 | }; |
764 | 773 | }, |
765 | 774 | computed: { |
@@ -994,13 +1003,8 @@ export default { |
994 | 1003 | } |
995 | 1004 | }, |
996 | 1005 | async onActivityClicked(activityId) { |
997 | | - if (activityId === "save-and-exit") { |
998 | | - await this.saveOrCreate(); |
999 | | - this.$router.push("/workflows/list"); |
1000 | | - } |
1001 | | -
|
1002 | 1006 | if (activityId === "exit") { |
1003 | | - this.$router.push("/workflows/list"); |
| 1007 | + this.onNavigate("/workflows/list"); |
1004 | 1008 | } |
1005 | 1009 |
|
1006 | 1010 | if (activityId === "workflow-download") { |
@@ -1109,6 +1113,7 @@ export default { |
1109 | 1113 | } else if (this.hasChanges && !forceSave && !ignoreChanges) { |
1110 | 1114 | // if there are changes, prompt user to save or discard or cancel |
1111 | 1115 | this.navUrl = url; |
| 1116 | + this.saveChangesAppendVersion = appendVersion; |
1112 | 1117 | this.showSaveChangesModal = true; |
1113 | 1118 | } else if (forceSave) { |
1114 | 1119 | // when forceSave is true, save the workflow before navigating |
|
0 commit comments