Ahmad Kholid 3 years ago
parent
commit
2843f6c286

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "automa",
   "name": "automa",
-  "version": "1.5.0",
+  "version": "1.5.1",
   "description": "An extension for automating your browser by connecting blocks",
   "description": "An extension for automating your browser by connecting blocks",
   "license": "MIT",
   "license": "MIT",
   "repository": {
   "repository": {

+ 2 - 2
src/background/workflow-engine/blocks-handler/handler-insert-data.js

@@ -2,7 +2,7 @@ import { getBlockConnection } from '../helper';
 import { parseJSON } from '@/utils/helper';
 import { parseJSON } from '@/utils/helper';
 import mustacheReplacer from '@/utils/reference-data/mustache-replacer';
 import mustacheReplacer from '@/utils/reference-data/mustache-replacer';
 
 
-function delay({ outputs, data }, { refData }) {
+function insertData({ outputs, data }, { refData }) {
   return new Promise((resolve) => {
   return new Promise((resolve) => {
     data.dataList.forEach(({ name, value, type }) => {
     data.dataList.forEach(({ name, value, type }) => {
       const replacedValue = mustacheReplacer(value, refData);
       const replacedValue = mustacheReplacer(value, refData);
@@ -21,4 +21,4 @@ function delay({ outputs, data }, { refData }) {
   });
   });
 }
 }
 
 
-export default delay;
+export default insertData;

+ 15 - 13
src/components/newtab/workflow/edit/EditTakeScreenshot.vue

@@ -1,17 +1,19 @@
 <template>
 <template>
-  <p class="text-sm text-gray-600 dark:text-gray-200 ml-2">Image quality</p>
-  <div class="bg-box-transparent px-4 mb-4 py-2 rounded-lg flex items-center">
-    <input
-      :value="data.quality"
-      :title="t('workflow.blocks.take-screenshot.imageQuality')"
-      class="focus:outline-none flex-1"
-      type="range"
-      min="0"
-      max="100"
-      @change="updateQuality"
-    />
-    <span class="w-12 text-right">{{ data.quality }}%</span>
-  </div>
+  <template v-if="data.ext === 'jpeg'">
+    <p class="text-sm text-gray-600 dark:text-gray-200 ml-2">Image quality</p>
+    <div class="bg-box-transparent px-4 mb-4 py-2 rounded-lg flex items-center">
+      <input
+        :value="data.quality"
+        :title="t('workflow.blocks.take-screenshot.imageQuality')"
+        class="focus:outline-none flex-1"
+        type="range"
+        min="0"
+        max="100"
+        @change="updateQuality"
+      />
+      <span class="w-12 text-right">{{ data.quality }}%</span>
+    </div>
+  </template>
   <div class="take-screenshot">
   <div class="take-screenshot">
     <ui-checkbox
     <ui-checkbox
       :model-value="data.fullPage"
       :model-value="data.fullPage"

+ 1 - 1
src/locales/en/blocks.json

@@ -53,7 +53,7 @@
         "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
         "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).",
         "accept": "Accept dialog",
         "accept": "Accept dialog",
         "promptText": {
         "promptText": {
-          "label": "Prompt text",
+          "label": "Prompt text (optional)",
           "description": "The text to enter into the dialog prompt before accepting"
           "description": "The text to enter into the dialog prompt before accepting"
         }
         }
       },
       },

+ 2 - 2
src/newtab/pages/logs/[id].vue

@@ -39,14 +39,14 @@
             >
             >
               <v-remixicon :name="logsType[item.type]?.icon" size="20" />
               <v-remixicon :name="logsType[item.type]?.icon" size="20" />
             </span>
             </span>
-            <div class="flex-1 text-overflow pr-2">
+            <div class="flex-1 line-clamp pr-2">
               <p class="w-full text-overflow leading-tight">
               <p class="w-full text-overflow leading-tight">
                 {{ item.name }}
                 {{ item.name }}
               </p>
               </p>
               <p
               <p
                 v-if="item.message"
                 v-if="item.message"
                 :title="item.message"
                 :title="item.message"
-                class="text-sm leading-tight text-overflow text-gray-600 dark:text-gray-200"
+                class="text-sm line-clamp text-gray-600 dark:text-gray-200"
               >
               >
                 {{ item.message }}
                 {{ item.message }}
               </p>
               </p>

+ 1 - 1
src/newtab/pages/settings/Backup.vue

@@ -42,7 +42,7 @@
           </ui-button>
           </ui-button>
         </div>
         </div>
       </template>
       </template>
-      <p v-else>
+      <p v-if="false">
         Upgrade to the
         Upgrade to the
         <a
         <a
           href="https://automa.site/pricing"
           href="https://automa.site/pricing"

+ 2 - 1
src/utils/workflow-trigger.js

@@ -100,7 +100,8 @@ export function registerSpecificDate(workflowId, data) {
 
 
   if (data.date) {
   if (data.date) {
     const [hour, minute] = data.time.split(':');
     const [hour, minute] = data.time.split(':');
-    date = dayjs(data.data).hour(hour).minute(minute).second(0).valueOf();
+
+    date = dayjs(data.date).hour(hour).minute(minute).second(0).valueOf();
   }
   }
 
 
   return browser.alarms.create(workflowId, {
   return browser.alarms.create(workflowId, {