mirror of
https://github.com/certd/certd.git
synced 2026-07-16 02:37:34 +08:00
perf: 通知选择器优化
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user