@plasosdk/plaso-electron-sdk 1.3.15 → 1.3.16-beta.0
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/README.md +12 -0
- package/js/macro.js +17 -12
- package/js/render.js +15 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -743,6 +743,18 @@ function createLiveClassWindow(params: CreateClassWindowPamras): void;
|
|
|
743
743
|
|
|
744
744
|
用户从自己的资料中心往**实时课堂/备课课堂**插入WORD/EXCEL/PPT/PDF、音视频、备课文件等,详见[云盘接入](https://open.plaso.cn/doc-6285183#insertobject)
|
|
745
745
|
|
|
746
|
+
##### PlasoElectronSdk.updateProhibitedWords
|
|
747
|
+
|
|
748
|
+
更新严禁词
|
|
749
|
+
|
|
750
|
+
- 设置严禁词后,消息发送时会受到严禁词列表的限制。
|
|
751
|
+
- 严禁词功能只对upimeRole为listener的角色有效。
|
|
752
|
+
- 该函数需在课堂准备好后调用(onClassWindowReadyFn回调触发后,即代表课堂准备好)
|
|
753
|
+
|
|
754
|
+
```ts
|
|
755
|
+
type updateProhibitedWords = (words: string[]) => void;
|
|
756
|
+
```
|
|
757
|
+
|
|
746
758
|
## 资料中心
|
|
747
759
|
|
|
748
760
|
- 进课堂时,对象 `classOptions.supportShowResourceCenter` 需要是 true
|
package/js/macro.js
CHANGED
|
@@ -20,34 +20,39 @@ const LESSON_TYPE = {
|
|
|
20
20
|
|
|
21
21
|
/** 课堂窗口与外部窗口通讯的消息 */
|
|
22
22
|
const CLASS_WINDOW_MESG_TYPE = {
|
|
23
|
+
// <<<<<<< 接收的消息 <<<<<<<
|
|
24
|
+
/** 初始化 globalAppInfo */
|
|
25
|
+
INIT_GLOBAL_APPINFO: 'init_global_appinfo',
|
|
23
26
|
/** 课堂dom渲染成功后告知外部应用窗口,传参用户信息 */
|
|
24
27
|
LIVE_WINDOW_READY: 'liveWindowReady',
|
|
25
28
|
/** 课堂结束 */
|
|
26
29
|
ON_CLASS_FINISHED: 'onClassFinished',
|
|
27
|
-
/** 初始化 globalAppInfo */
|
|
28
|
-
INIT_GLOBAL_APPINFO: 'init_global_appinfo',
|
|
29
|
-
/** html ready */
|
|
30
|
-
HTML_READY: 'html_ready',
|
|
31
30
|
/** 保存白板文件 */
|
|
32
31
|
SAVE_BOARD: 'save_board',
|
|
32
|
+
/** 打开资料中心 */
|
|
33
|
+
OPEN_RESOURCE_CENTER: 'open_resource_center',
|
|
34
|
+
/** 通知外部调用getExtFileName */
|
|
35
|
+
GET_EXT_FILE_NAME: 'getExtFileName',
|
|
36
|
+
/** 通知外部调用getPreParseFileName */
|
|
37
|
+
GET_PRE_PARSE_FILE_NAME: 'getPreParseFileName',
|
|
38
|
+
/** 上报问题 */
|
|
39
|
+
REPORT_ISSUES: 'reportIssues',
|
|
40
|
+
|
|
41
|
+
// >>>>>>> 发送的消息 >>>>>>>
|
|
42
|
+
/** html ready */
|
|
43
|
+
HTML_READY: 'html_ready',
|
|
44
|
+
/** 更新屏蔽词 */
|
|
45
|
+
UPDATE_SENSITIVE_WORDS: 'updateSensitiveWords',
|
|
33
46
|
/** 响应保存白板文件 */
|
|
34
47
|
RESP_SAVE_BOARD: 'resp_save_board',
|
|
35
48
|
/** 插入白板文件 */
|
|
36
49
|
INSERT_BOARD: 'insert_board',
|
|
37
|
-
/** 打开资料中心 */
|
|
38
|
-
OPEN_RESOURCE_CENTER: 'open_resource_center',
|
|
39
50
|
/** 插入文件 */
|
|
40
51
|
INSERT_OBJECT: 'insertObject',
|
|
41
|
-
/** 通知外部调用getExtFileName */
|
|
42
|
-
GET_EXT_FILE_NAME: 'getExtFileName',
|
|
43
52
|
/** 响应getExtFileName */
|
|
44
53
|
RESP_GET_EXT_FILE_NAME: 'respGetExtFileName',
|
|
45
|
-
/** 通知外部调用getPreParseFileName */
|
|
46
|
-
GET_PRE_PARSE_FILE_NAME: 'getPreParseFileName',
|
|
47
54
|
/** 响应getPreParseFileName */
|
|
48
55
|
RESP_GET_PRE_PARSE_FILE_NAME: 'respGetPreParseFileName',
|
|
49
|
-
/** 上报问题 */
|
|
50
|
-
REPORT_ISSUES: 'reportIssues',
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
const LEVEL = {
|
package/js/render.js
CHANGED
|
@@ -120,7 +120,7 @@ function createClassWindow(classWindowProps) {
|
|
|
120
120
|
rhost = `https://${env}.plaso.cn/static/yxtsdk/`;
|
|
121
121
|
dhost = `https://${env}.plaso.cn/`;
|
|
122
122
|
} else {
|
|
123
|
-
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version ?? '1.60.
|
|
123
|
+
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version ?? '1.60.139'}/`;
|
|
124
124
|
dhost = 'https://www.plaso.cn/';
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -403,6 +403,19 @@ function insertObject(fileData) {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
/**
|
|
407
|
+
* 更新严禁词列表
|
|
408
|
+
* @param {string[]} words 严禁词数组
|
|
409
|
+
*/
|
|
410
|
+
function updateProhibitedWords(words) {
|
|
411
|
+
try {
|
|
412
|
+
const { ipcRenderer } = window.require('electron');
|
|
413
|
+
if (currentWebContentsId) ipcRenderer.sendTo(currentWebContentsId, CLASS_WINDOW_MESG_TYPE.UPDATE_SENSITIVE_WORDS, words || []);
|
|
414
|
+
} catch (error) {
|
|
415
|
+
logger.error(`updateProhibitedWords error is: ${JSON.stringify(error)}}`);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
406
419
|
function getVersion() {
|
|
407
420
|
try {
|
|
408
421
|
const packageJson = require('../package.json');
|
|
@@ -428,6 +441,7 @@ const PlasoElectronSdk = {
|
|
|
428
441
|
getVersion: getVersion,
|
|
429
442
|
initLogConfig: initLogConfig,
|
|
430
443
|
insertObject: insertObject,
|
|
444
|
+
updateProhibitedWords: updateProhibitedWords,
|
|
431
445
|
FILE_TYPE: FILE_TYPE,
|
|
432
446
|
};
|
|
433
447
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasosdk/plaso-electron-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16-beta.0",
|
|
4
4
|
"description": "伯索课堂Electron SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "electron .",
|
|
8
8
|
"install": "node ./scripts/install.js",
|
|
9
|
-
"release": "npm version patch &&
|
|
10
|
-
"release:minor": "npm version minor &&
|
|
11
|
-
"release:major": "npm version major &&
|
|
9
|
+
"release": "npm version patch && git push --follow-tags && npm publish",
|
|
10
|
+
"release:minor": "npm version minor && git push --follow-tags && npm publish",
|
|
11
|
+
"release:major": "npm version major && git push --follow-tags && npm publish",
|
|
12
|
+
"release:beta": "npm version prerelease --preid=beta && git push --follow-tags && npm publish --tag beta"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"plaso",
|