@tachybase/plugin-manual-notification 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/externalVersion.js
CHANGED
|
@@ -77,7 +77,7 @@ class notificationsController {
|
|
|
77
77
|
}
|
|
78
78
|
async send(ctx, next) {
|
|
79
79
|
try {
|
|
80
|
-
if (ctx.
|
|
80
|
+
if (ctx.tego.name !== "main") {
|
|
81
81
|
ctx.throw(403, ctx.t("Forbidden broadcast in sub application"));
|
|
82
82
|
}
|
|
83
83
|
const { title = "", detail: content = "", level = "open", notifyType } = ctx.action.params;
|
|
@@ -99,17 +99,17 @@ class notificationsController {
|
|
|
99
99
|
}
|
|
100
100
|
switch (notifyType) {
|
|
101
101
|
case import_server.NoticeType.MODAL:
|
|
102
|
-
ctx.
|
|
102
|
+
ctx.tego.noticeManager.modal(title, content, level, duration);
|
|
103
103
|
break;
|
|
104
104
|
case import_server.NoticeType.STATUS:
|
|
105
|
-
ctx.
|
|
105
|
+
ctx.tego.noticeManager.status(content, level, duration);
|
|
106
106
|
break;
|
|
107
107
|
case import_server.NoticeType.TOAST:
|
|
108
|
-
ctx.
|
|
108
|
+
ctx.tego.noticeManager.toast(content, level, duration);
|
|
109
109
|
break;
|
|
110
110
|
case import_server.NoticeType.NOTIFICATION:
|
|
111
111
|
default:
|
|
112
|
-
ctx.
|
|
112
|
+
ctx.tego.noticeManager.notification(title, content, level, duration);
|
|
113
113
|
}
|
|
114
114
|
const item = {
|
|
115
115
|
content,
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-manual-notification",
|
|
3
3
|
"displayName": "Manual Notification",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"description": "Used to send notifications to all online users, including system updates and important events",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"System management"
|
|
8
8
|
],
|
|
9
9
|
"main": "dist/server/index.js",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@tachybase/schema": "1.
|
|
12
|
-
"@tachybase/test": "1.
|
|
13
|
-
"@tego/client": "1.
|
|
14
|
-
"@tego/server": "1.
|
|
11
|
+
"@tachybase/schema": "1.6.0-alpha.9",
|
|
12
|
+
"@tachybase/test": "1.6.0-alpha.9",
|
|
13
|
+
"@tego/client": "1.6.0-alpha.9",
|
|
14
|
+
"@tego/server": "1.6.0-alpha.9",
|
|
15
15
|
"antd": "5.22.5",
|
|
16
|
-
"@tachybase/client": "1.
|
|
16
|
+
"@tachybase/client": "1.6.1"
|
|
17
17
|
},
|
|
18
18
|
"description.zh-CN": "用于给所有在线人员发送通知,包括系统更新,重要事件",
|
|
19
19
|
"displayName.zh-CN": "广播通知"
|