mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 21:19:51 +00:00
feat: add preset webhook template for serverchan3
This commit is contained in:
parent
daf22b7f15
commit
efdeacf01a
@ -224,7 +224,24 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
);
|
||||
break;
|
||||
|
||||
case "serverchan":
|
||||
case "serverchan3":
|
||||
formInst.setFieldValue("url", "https://<your-serverchan-uid>.push.ft07.com/send/<your-serverchan-sendkey>.send");
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
title: "${SUBJECT}",
|
||||
desp: "${MESSAGE}",
|
||||
},
|
||||
null,
|
||||
2
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case "serverchanturbo":
|
||||
formInst.setFieldValue("url", "https://sctapi.ftqq.com/<your-serverchan-key>.send");
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
@ -329,9 +346,9 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
<div className="text-right">
|
||||
<Dropdown
|
||||
menu={{
|
||||
items: ["bark", "ntfy", "gotify", "pushover", "pushplus", "serverchan", "common"].map((key) => ({
|
||||
items: ["bark", "ntfy", "gotify", "pushover", "pushplus", "serverchan3", "serverchanturbo", "common"].map((key) => ({
|
||||
key,
|
||||
label: t(`access.form.webhook_preset_data.option.${key}.label`),
|
||||
label: <span dangerouslySetInnerHTML={{ __html: t(`access.form.webhook_preset_data.option.${key}.label`) }}></span>,
|
||||
onClick: () => handlePresetDataForNotificationClick(key),
|
||||
})),
|
||||
}}
|
||||
|
@ -465,7 +465,8 @@
|
||||
"access.form.webhook_preset_data.option.ntfy.label": "ntfy",
|
||||
"access.form.webhook_preset_data.option.pushover.label": "Pushover",
|
||||
"access.form.webhook_preset_data.option.pushplus.label": "PushPlus",
|
||||
"access.form.webhook_preset_data.option.serverchan.label": "ServerChan",
|
||||
"access.form.webhook_preset_data.option.serverchan3.label": "ServerChan<sup>3</sup>",
|
||||
"access.form.webhook_preset_data.option.serverchanturbo.label": "ServerChan<sup>Turbo</sup>",
|
||||
"access.form.webhook_preset_data.option.common.label": "General template",
|
||||
"access.form.wecombot_webhook_url.label": "WeCom bot Webhook URL",
|
||||
"access.form.wecombot_webhook_url.placeholder": "Please enter WeCom bot Webhook URL",
|
||||
|
@ -465,7 +465,8 @@
|
||||
"access.form.webhook_preset_data.option.ntfy.label": "ntfy",
|
||||
"access.form.webhook_preset_data.option.pushover.label": "Pushover",
|
||||
"access.form.webhook_preset_data.option.pushplus.label": "PushPlus 推送加",
|
||||
"access.form.webhook_preset_data.option.serverchan.label": "Server 酱",
|
||||
"access.form.webhook_preset_data.option.serverchan3.label": "Server 酱 <sup>3</sup>",
|
||||
"access.form.webhook_preset_data.option.serverchanturbo.label": "Server酱 <sup>Turbo</sup>",
|
||||
"access.form.webhook_preset_data.option.common.label": "通用模板",
|
||||
"access.form.wecombot_webhook_url.label": "企业微信群机器人 Webhook 地址",
|
||||
"access.form.wecombot_webhook_url.placeholder": "请输入企业微信群机器人 Webhook 地址",
|
||||
|
Loading…
x
Reference in New Issue
Block a user