Browse Source

feat: increase condition limit in conditions block

Ahmad Kholid 3 years ago
parent
commit
2455fa531e

+ 1 - 1
src/components/block/BlockConditions.vue

@@ -101,7 +101,7 @@ function addConditionEmit({ id }) {
 
   const { length } = block.data.conditions;
 
-  if (length >= 10) return;
+  if (length >= 20) return;
   if (length === 0) props.editor.addNodeOutput(block.id);
 
   props.editor.addNodeOutput(block.id);

+ 2 - 2
src/components/newtab/workflow/edit/EditConditions.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="mb-4 flex items-center justify-between">
       <ui-button
-        :disabled="conditions.length >= 10"
+        :disabled="conditions.length >= 20"
         variant="accent"
         class="mr-2"
         @click="addCondition"
@@ -115,7 +115,7 @@ function editCondition(index) {
   state.showModal = true;
 }
 function addCondition() {
-  if (conditions.value.length >= 10) return;
+  if (conditions.value.length >= 20) return;
 
   emitter.emit('conditions-block:add', {
     id: props.blockId,

+ 2 - 2
src/content/services/recordWorkflow/App.vue

@@ -432,8 +432,6 @@ function startSelecting(list = false) {
   window.addEventListener('keyup', onKeyup);
 }
 function onMousemove({ clientX, clientY, target: eventTarget }) {
-  if (!selectState.isSelecting) return;
-
   if (draggingState.dragging) {
     draggingState.xPos = clientX - mouseRelativePos.x;
     draggingState.yPos = clientY - mouseRelativePos.y;
@@ -441,6 +439,8 @@ function onMousemove({ clientX, clientY, target: eventTarget }) {
     return;
   }
 
+  if (!selectState.isSelecting) return;
+
   const elementSelected = selectState.selectedElements.length > 0;
   const disable = selectState.list && !selectState.listId && elementSelected;
   if (disable) return;