增加PushMe消息通道 (#2018),修复系统设置保存通知

This commit is contained in:
雨思
2023-07-20 13:19:39 +08:00
committed by GitHub
parent 56eb0c5408
commit 373b8c97d7
7 changed files with 108 additions and 6 deletions
+1 -3
View File
@@ -50,9 +50,7 @@ const Initialization = () => {
const submitNotification = (values: any) => {
setLoading(true);
request
.put(`${config.apiPrefix}user/notification/init`, {
values,
})
.put(`${config.apiPrefix}user/notification/init`, values)
.then(({ code, data }) => {
if (code === 200) {
next();
+1 -3
View File
@@ -19,9 +19,7 @@ const NotificationSetting = ({ data }: any) => {
}
request
.put(`${config.apiPrefix}user/notification`, {
values,
})
.put(`${config.apiPrefix}user/notification`, values)
.then(({ code, data }) => {
if (code === 200) {
message.success(values.type ? '通知发送成功' : '通知关闭成功');
+8
View File
@@ -96,6 +96,7 @@ export default {
{ value: 'chat', label: '群晖chat' },
{ value: 'email', label: '邮箱' },
{ value: 'lark', label: '飞书机器人' },
{ value: 'pushMe', label: 'PushMe' },
{ value: 'webhook', label: '自定义通知' },
{ value: 'closed', label: '已关闭' },
],
@@ -268,6 +269,13 @@ export default {
{ label: 'emailUser', tip: '邮箱地址', required: true },
{ label: 'emailPass', tip: '邮箱SMTP授权码', required: true },
],
pushMe: [
{
label: 'pushMeKey',
tip: 'PushMe的Keyhttps://push.i-i.me/',
required: true,
},
],
webhook: [
{
label: 'webhookMethod',