【调整】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

@@ -140,7 +140,7 @@ export function createNodeFormConfig() {
* @param valueRef 值引用
*/
siteDeploy() {
return [this.input($t('t_0_1747296173751'), 'siteName', { placeholder: $t('t_1_1747296175494') })]
return [this.input($t('t_0_1747296173751'), 'siteName', { placeholder: $t('请输入网站名,只支持单个网站部署') })]
},
/**

View File

@@ -180,13 +180,6 @@ export default defineComponent({
clearable: true, // 可清除
loading: siteOptionsLoading.value,
onSearch: handleSiteSearch,
// onUpdateValue: (val: string, option: { label: string; value: string }) => {
// if (param.value.provider === '1panel-site') {
// param.value.site_id = val
// } else {
// param.value.siteName = val
// }
// },
},
),
)

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证书错误
})