Browse Source

feat: description in conditions block

Ahmad Kholid 2 years ago
parent
commit
dbff1a3114

+ 6 - 0
src/components/block/BlockConditions.vue

@@ -25,6 +25,12 @@
         @click="$emit('edit')"
         @click="$emit('edit')"
       />
       />
     </div>
     </div>
+    <p
+      v-show="data.description"
+      class="text-gray-600 mt-2 dark:text-gray-200 text-overflow leading-tight"
+    >
+      {{ data.description }}
+    </p>
     <ul
     <ul
       v-if="data.conditions && data.conditions.length !== 0"
       v-if="data.conditions && data.conditions.length !== 0"
       class="mt-4 space-y-2"
       class="mt-4 space-y-2"

+ 7 - 1
src/components/newtab/workflow/edit/EditConditions.vue

@@ -1,6 +1,12 @@
 <template>
 <template>
   <div>
   <div>
-    <div class="mb-4 flex items-center space-x-2">
+    <ui-textarea
+      :model-value="data.description"
+      class="w-full"
+      :placeholder="t('common.description')"
+      @change="updateData({ description: $event })"
+    />
+    <div class="my-4 flex items-center space-x-2">
       <p v-if="state.showSettings" class="font-semibold">
       <p v-if="state.showSettings" class="font-semibold">
         {{ t('common.settings') }}
         {{ t('common.settings') }}
       </p>
       </p>

+ 1 - 0
src/utils/shared.js

@@ -603,6 +603,7 @@ export const tasks = {
     allowedInputs: true,
     allowedInputs: true,
     maxConnection: 1,
     maxConnection: 1,
     data: {
     data: {
+      description: '',
       disableBlock: false,
       disableBlock: false,
       conditions: [],
       conditions: [],
       retryConditions: false,
       retryConditions: false,