【调整】webhook参数的提示和顺序

This commit is contained in:
chudong
2025-05-30 15:01:49 +08:00
parent 573e7afa6e
commit f38af158b9
52 changed files with 70 additions and 67 deletions

View File

@@ -229,12 +229,22 @@ export const useWebhookChannelFormController = () => {
const config = computed(() => [
useFormInput($t('t_2_1745289353944'), 'name'),
useFormInput('WebHook回调地址', 'url'),
useFormTextarea('WebHook推送通知回调数据可选', 'data', { rows: 3 }, { showRequireMark: false }),
useFormSelect('请求方式', 'method', [
{ label: 'POST', value: 'post' },
{ label: 'GET', value: 'get' },
]),
useFormTextarea('WebHook请求头可选', 'headers', { rows: 3 }, { showRequireMark: false }),
useFormTextarea(
'WebHook请求头可选',
'headers',
{ rows: 3, placeholder: 'Content-Type: application/json' },
{ showRequireMark: false },
),
useFormTextarea(
'WebHook推送通知回调数据可选',
'data',
{ rows: 3, placeholder: '请使用JSON格式例如{"title":"test","content":"test"}' },
{ showRequireMark: false },
),
useFormSwitch('忽略SSL/TLS证书错误', 'ignore_ssl'),
])

View File

@@ -95,7 +95,7 @@ export const useSettingsStore = defineStore('settings-store', () => {
url: '', // WebHook回调地址
data: '', // WebHook推送通知回调数据可选
method: 'post', // 请求方式
headers: '', // WebHook请求头可选
headers: 'Content-Type: application/json', // WebHook请求头可选
ignore_ssl: false, // 忽略SSL/TLS证书错误
})