mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
添加通知设置页面
This commit is contained in:
1 parent
bb0ad6c325
commit
0a9e9e972d
8 files changed
+278
-6
No files matched your search
+20
-1
@@ -39,7 +39,26 @@ export default class NotificationService {
|
||||
this.content = content;
|
||||
this.params = rest;
|
||||
const notificationModeAction = this.modeMap.get(type);
|
||||
notificationModeAction?.call(this);
|
||||
try {
|
||||
return await notificationModeAction?.call(this);
|
||||
} catch (error: any) {
|
||||
return error.message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async testNotify(
|
||||
info: NotificationInfo,
|
||||
title: string,
|
||||
content: string,
|
||||
) {
|
||||
const { type, ...rest } = info;
|
||||
if (type) {
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.params = rest;
|
||||
const notificationModeAction = this.modeMap.get(type);
|
||||
return await notificationModeAction?.call(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user