From 76068c3b51d8e2551bbea1782a977d2b037424ba Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 11 Apr 2024 11:06:26 +0000 Subject: [PATCH] refactor: enable webhook body --- packages/nc-gui/components/webhook/Editor.vue | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui/components/webhook/Editor.vue b/packages/nc-gui/components/webhook/Editor.vue index 27b7c2dc8a..978bc46a85 100644 --- a/packages/nc-gui/components/webhook/Editor.vue +++ b/packages/nc-gui/components/webhook/Editor.vue @@ -76,7 +76,6 @@ let hookRef = reactive< version: 'v2', }) -const isBodyShownEasterEgg = ref(false) const isBodyShown = ref(hookRef.version === 'v1' || isEeUI) const urlTabKey = ref<'params' | 'headers' | 'body'>('params') @@ -478,13 +477,6 @@ const getDefaultHookName = (hooks: HookType[]) => { return extractNextDefaultName([...hooks.map((el) => el?.title || '')], defaultHookName) } -const handleToggleEasterEgg = () => { - isBodyShownEasterEgg.value = !isBodyShownEasterEgg.value - if (!(isBodyShown.value && isBodyShownEasterEgg.value) && urlTabKey.value === 'body') { - urlTabKey.value = 'params' - } -} - watch( () => hookRef.eventOperation, () => { @@ -662,7 +654,6 @@ onMounted(async () => { size="large" class="nc-select-hook-url-method" dropdown-class-name="nc-dropdown-hook-notification-url-method" - @dblclick="handleToggleEasterEgg" >
@@ -700,7 +691,7 @@ onMounted(async () => { - + { -
+
{{ $t('msg.webhookBodyMsg1') }} {{ $t('msg.webhookBodyMsg2') }}