-
+
diff --git a/client/src/components/Workflow/Editor/Options.test.js b/client/src/components/Workflow/Editor/Options.test.js
deleted file mode 100644
index b51974a781b0..000000000000
--- a/client/src/components/Workflow/Editor/Options.test.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import { shallowMount } from "@vue/test-utils";
-import { getLocalVue } from "tests/jest/helpers";
-
-import Options from "./Options";
-
-const localVue = getLocalVue();
-
-describe("Options", () => {
- it("render properly", async () => {
- const wrapper = shallowMount(Options, {
- propsData: { hasChanges: true },
- localVue,
- });
- await wrapper.vm.$nextTick();
- expect(wrapper.find(".editor-button-save").attributes("role")).toBe("button");
- expect(wrapper.find(".editor-button-save").attributes("disabled")).toBeFalsy();
- expect(wrapper.find(".editor-button-save-group").attributes("title")).toBe("Save Workflow");
-
- // requires a non-shallow mount
- // wrapper.find('.editor-button-attributes').trigger('click');
- // expect(wrapper.emitted().onAttributes).toBeTruthy();
- });
-
- it("should disable save if no changes", async () => {
- const wrapper = shallowMount(Options, {
- propsData: { hasChanges: false },
- localVue,
- });
- await wrapper.vm.$nextTick();
- expect(wrapper.find(".editor-button-save").attributes("disabled")).toBe("true");
- });
-});
diff --git a/client/src/components/Workflow/Editor/Options.vue b/client/src/components/Workflow/Editor/Options.vue
deleted file mode 100644
index e288489a0364..000000000000
--- a/client/src/components/Workflow/Editor/Options.vue
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-
diff --git a/client/src/components/Workflow/Editor/Tools/ToolBar.vue b/client/src/components/Workflow/Editor/Tools/ToolBar.vue
index c902f381bccf..d68eaa62f0ce 100644
--- a/client/src/components/Workflow/Editor/Tools/ToolBar.vue
+++ b/client/src/components/Workflow/Editor/Tools/ToolBar.vue
@@ -17,7 +17,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { useMagicKeys, whenever } from "@vueuse/core";
import { BButton, BButtonGroup, BFormInput } from "bootstrap-vue";
//@ts-ignore deprecated package without types (vue 2, remove this comment on vue 3 migration)
-import { BoxSelect } from "lucide-vue";
+import { BoxSelect, Workflow } from "lucide-vue";
import { storeToRefs } from "pinia";
import { computed, toRefs, watch } from "vue";
@@ -27,6 +27,7 @@ import { useWorkflowStores } from "@/composables/workflowStores";
import { type CommentTool } from "@/stores/workflowEditorToolbarStore";
import { match } from "@/utils/utils";
+import { AutoLayoutAction } from "../Actions/stepActions";
import { useSelectionOperations } from "./useSelectionOperations";
import { useToolLogic } from "./useToolLogic";
@@ -46,7 +47,7 @@ library.add(
faTrash
);
-const { toolbarStore, undoRedoStore, commentStore } = useWorkflowStores();
+const { toolbarStore, undoRedoStore, commentStore, workflowId } = useWorkflowStores();
const { snapActive, currentTool } = toRefs(toolbarStore);
const { commentOptions } = toolbarStore;
@@ -128,7 +129,7 @@ function onRemoveAllFreehand() {
useToolLogic();
-const { ctrl_1, ctrl_2, ctrl_3, ctrl_4, ctrl_5, ctrl_6, ctrl_7, ctrl_8 } = useMagicKeys();
+const { ctrl_1, ctrl_2, ctrl_3, ctrl_4, ctrl_5, ctrl_6, ctrl_7, ctrl_8, ctrl_9 } = useMagicKeys();
whenever(ctrl_1!, () => (toolbarStore.currentTool = "pointer"));
whenever(ctrl_2!, () => (toolbarStore.snapActive = !toolbarStore.snapActive));
@@ -138,6 +139,7 @@ whenever(ctrl_5!, () => (toolbarStore.currentTool = "frameComment"));
whenever(ctrl_6!, () => (toolbarStore.currentTool = "freehandComment"));
whenever(ctrl_7!, () => (toolbarStore.currentTool = "freehandEraser"));
whenever(ctrl_8!, () => (toolbarStore.currentTool = "boxSelect"));
+whenever(ctrl_9!, () => autoLayout());
const toggleVisibilityButtonTitle = computed(() => {
if (toolbarVisible.value) {
@@ -148,6 +150,10 @@ const toggleVisibilityButtonTitle = computed(() => {
});
const { anySelected, selectedCountText, deleteSelection, deselectAll, duplicateSelection } = useSelectionOperations();
+
+function autoLayout() {
+ undoRedoStore.applyAction(new AutoLayoutAction(workflowId));
+}
@@ -242,6 +248,17 @@ const { anySelected, selectedCountText, deleteSelection, deselectAll, duplicateS
@click="onClickBoxSelect">
+
+
+
+
+
+ {{ selectedCountText }}
+
+
+
+ Clear
+
+
+ Duplicate
+
+
+ Delete
+
+
+
+
- {{ selectedCountText }}
-
-
-
- Clear
-
-
- Duplicate
-
-
- Delete
-
-
-