Add headers to webhook.

This commit is contained in:
Yang Luo
2021-12-26 20:40:13 +08:00
parent 5015bf1c7d
commit 0c665edcbc
6 changed files with 170 additions and 8 deletions

View File

@ -19,6 +19,7 @@ import * as WebhookBackend from "./backend/WebhookBackend";
import * as OrganizationBackend from "./backend/OrganizationBackend";
import * as Setting from "./Setting";
import i18next from "i18next";
import WebhookHeaderTable from "./WebhookHeaderTable";
const { Option } = Select;
@ -146,6 +147,18 @@ class WebhookEditPage extends React.Component {
</Select>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("webhook:Headers"), i18next.t("webhook:Headers - Tooltip"))} :
</Col>
<Col span={22} >
<WebhookHeaderTable
title={i18next.t("webhook:Headers")}
table={this.state.webhook.headers}
onUpdateTable={(value) => { this.updateWebhookField('headers', value)}}
/>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("webhook:Events"), i18next.t("webhook:Events - Tooltip"))} :