From 833079d495963baaaa4aa49f7dece115892a569f Mon Sep 17 00:00:00 2001 From: keven1024 Date: Fri, 1 May 2026 21:24:45 +0800 Subject: [PATCH] feat(front): enhance NotifyConfigField component to support parsing of cURL commands and add body field for webhook configuration --- .../Preprocessing/NotifyConfigField.vue | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/front/components/Preprocessing/NotifyConfigField.vue b/front/components/Preprocessing/NotifyConfigField.vue index 8c6de63..7a48c31 100644 --- a/front/components/Preprocessing/NotifyConfigField.vue +++ b/front/components/Preprocessing/NotifyConfigField.vue @@ -8,14 +8,14 @@ import InputGroupField from '../Field/InputGroupField.vue' import InputField from '../Field/InputField.vue' import KvInputField from '../Field/KvInputGroupField.vue' import TextareaField from '../Field/TextareaField.vue' +import { parseCurl } from 'sweet-curl-parser' interface WebhookItem { id: string url: string method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' - headers: Record - bodyType: 'none' | 'form-data' | 'raw' - body: string + headers: [string, string][] + body?: string } const { t } = useI18n() @@ -67,7 +67,30 @@ const expandedAdvanced = ref>(new Set()) />
- +