perf: 通知选择器优化

This commit is contained in:
xiaojunnuo
2024-12-02 14:06:55 +08:00
parent 68a503796c
commit 2c0cbdd29e
11 changed files with 274 additions and 150 deletions
@@ -17,6 +17,27 @@ export class SlackNotification extends BaseNotification {
})
webhook = '';
@NotificationInput({
title: '代理',
component: {
placeholder: 'http://xxxxx:xx',
},
helper: '使用https_proxy',
required: false,
})
httpsProxy = '';
@NotificationInput({
title: '忽略证书校验',
value: false,
component: {
name: 'a-switch',
vModel: 'checked',
},
required: false,
})
skipSslVerify: boolean;
async send(body: NotificationBody) {
if (!this.webhook) {
throw new Error('token不能为空');
@@ -28,6 +49,8 @@ export class SlackNotification extends BaseNotification {
data: {
text: `${body.title}\n${body.content}\n[查看详情](${body.url})`,
},
httpProxy: this.httpsProxy,
skipSslVerify: this.skipSslVerify,
});
}
}