@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.
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.5.1",
2
+ "@tachybase/client": "1.6.1",
3
3
  "antd": "5.22.5",
4
- "@tachybase/schema": "1.3.52",
5
- "@tego/server": "1.3.52"
4
+ "@tachybase/schema": "1.6.0-alpha.9",
5
+ "@tego/server": "1.6.0-alpha.9"
6
6
  };
@@ -77,7 +77,7 @@ class notificationsController {
77
77
  }
78
78
  async send(ctx, next) {
79
79
  try {
80
- if (ctx.app.name !== "main") {
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.app.noticeManager.modal(title, content, level, duration);
102
+ ctx.tego.noticeManager.modal(title, content, level, duration);
103
103
  break;
104
104
  case import_server.NoticeType.STATUS:
105
- ctx.app.noticeManager.status(content, level, duration);
105
+ ctx.tego.noticeManager.status(content, level, duration);
106
106
  break;
107
107
  case import_server.NoticeType.TOAST:
108
- ctx.app.noticeManager.toast(content, level, duration);
108
+ ctx.tego.noticeManager.toast(content, level, duration);
109
109
  break;
110
110
  case import_server.NoticeType.NOTIFICATION:
111
111
  default:
112
- ctx.app.noticeManager.notification(title, content, level, duration);
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.5.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.3.52",
12
- "@tachybase/test": "1.3.52",
13
- "@tego/client": "1.3.52",
14
- "@tego/server": "1.3.52",
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.5.1"
16
+ "@tachybase/client": "1.6.1"
17
17
  },
18
18
  "description.zh-CN": "用于给所有在线人员发送通知,包括系统更新,重要事件",
19
19
  "displayName.zh-CN": "广播通知"