Browse Source

fix: block settings

Ahmad Kholid 2 years ago
parent
commit
67c44f1efa

+ 7 - 3
src/components/newtab/workflow/edit/BlockSetting/BlockSettingGeneral.vue

@@ -16,8 +16,7 @@
           class="w-24"
           class="w-24"
         />
         />
       </div>
       </div>
-      <ui-list-item v-if="isDebugSupported" small>
-        <ui-switch v-model="state.debugMode" class="mr-4" />
+      <ui-list-item v-if="isDebugSupported" small class="mt-4">
         <div class="flex-1 overflow-hidden">
         <div class="flex-1 overflow-hidden">
           <p class="text-overflow">
           <p class="text-overflow">
             {{ t('workflow.settings.debugMode.title') }}
             {{ t('workflow.settings.debugMode.title') }}
@@ -28,6 +27,7 @@
             Execute block using the Chrome DevTools Protocol
             Execute block using the Chrome DevTools Protocol
           </p>
           </p>
         </div>
         </div>
+        <ui-switch v-model="state.debugMode" class="mr-4" />
       </ui-list-item>
       </ui-list-item>
     </ui-list>
     </ui-list>
   </div>
   </div>
@@ -41,6 +41,10 @@ const props = defineProps({
     type: Object,
     type: Object,
     default: () => ({}),
     default: () => ({}),
   },
   },
+  block: {
+    type: Object,
+    default: () => ({}),
+  },
 });
 });
 const emit = defineEmits(['change']);
 const emit = defineEmits(['change']);
 
 
@@ -52,7 +56,7 @@ const supportedDebugBlocks = [
 ];
 ];
 const browserType = BROWSER_TYPE;
 const browserType = BROWSER_TYPE;
 const isDebugSupported =
 const isDebugSupported =
-  browserType !== 'firefox' && supportedDebugBlocks.includes(props.data.id);
+  browserType !== 'firefox' && supportedDebugBlocks.includes(props.block.id);
 
 
 const { t } = useI18n();
 const { t } = useI18n();
 const state = reactive({ blockTimeout: 0 });
 const state = reactive({ blockTimeout: 0 });

+ 1 - 0
src/components/newtab/workflow/edit/EditBlockSettings.vue

@@ -8,6 +8,7 @@
     <ui-tab-panel value="general">
     <ui-tab-panel value="general">
       <block-setting-general
       <block-setting-general
         v-model:data="state.settings"
         v-model:data="state.settings"
+        :block="data"
         @change="onDataChange('settings', $event)"
         @change="onDataChange('settings', $event)"
       />
       />
     </ui-tab-panel>
     </ui-tab-panel>