@plasosdk/plaso-electron-sdk 1.2.7 → 1.2.8
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 +2 -1
- package/js/render.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -368,8 +368,9 @@ type onOpenResourceCenterFn = () => void;
|
|
|
368
368
|
|
|
369
369
|
```
|
|
370
370
|
// 通过 insertObject 插入的文件传入 参数 info 时,怎么从info中获取文件的可访问地址的逻辑在用户那,所以需要函数从外部用户获取外部用户传入的文件地址
|
|
371
|
+
// 其中info会作为args中的第一个参数回传
|
|
371
372
|
|
|
372
|
-
type onGetExtFileNameFn = (
|
|
373
|
+
type onGetExtFileNameFn = (...args: any[])=>Promise<string>
|
|
373
374
|
```
|
|
374
375
|
|
|
375
376
|
|
package/js/render.js
CHANGED
|
@@ -46,7 +46,7 @@ let currentWebContentsId = null;
|
|
|
46
46
|
* callback: (result: boolean) => void
|
|
47
47
|
* ) => void} [onSaveBoardFn] 保存板书,具体的保存逻辑由外部实现,取消保存板书时,callback传false, 不然传true
|
|
48
48
|
* @property {()=>void} [onOpenResourceCenterFn] 通知外部用户打开自己的资料中心,资料中心的具体ui和逻辑由外部用户自己实现
|
|
49
|
-
* @property {(
|
|
49
|
+
* @property {(...args: any[])=>Promise<string>} [onGetExtFileNameFn] 通过insertObject插入的文件传入 参数 info 时,怎么从info中获取文件的可访问地址的逻辑在用户那,所以需要函数从外部用户获取外部用户传入的文件地址
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
52
|
|
|
@@ -104,11 +104,11 @@ function createClassWindow(classWindowProps) {
|
|
|
104
104
|
if (env == 'local') {
|
|
105
105
|
rhost = 'http://localhost:4399/';
|
|
106
106
|
dhost = 'https://dev.plaso.cn/';
|
|
107
|
-
} else if (env == 'dev' || env == 'test') {
|
|
107
|
+
} else if (env == 'dev' || env == 'test' || env == 'itest' || env == 'ftest') {
|
|
108
108
|
rhost = `https://${env}.plaso.cn/static/yxtelectronsdk/`;
|
|
109
109
|
dhost = `https://${env}.plaso.cn/`;
|
|
110
110
|
} else {
|
|
111
|
-
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version ?? '1.53.
|
|
111
|
+
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version ?? '1.53.415'}/`;
|
|
112
112
|
dhost = 'https://www.plaso.cn/';
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -243,9 +243,9 @@ function createClassWindow(classWindowProps) {
|
|
|
243
243
|
if (onOpenResourceCenterFn) onOpenResourceCenterFn();
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
-
const onGetExtFileName = async (event,
|
|
247
|
-
if (onGetExtFileNameFn &&
|
|
248
|
-
const url = await onGetExtFileNameFn(
|
|
246
|
+
const onGetExtFileName = async (event, ...args) => {
|
|
247
|
+
if (onGetExtFileNameFn && args.length > 0) {
|
|
248
|
+
const url = await onGetExtFileNameFn(...args);
|
|
249
249
|
if (url) {
|
|
250
250
|
if (currentWebContentsId) {
|
|
251
251
|
ipcRenderer.sendTo(currentWebContentsId, CLASS_WINDOW_MESG_TYPE.RESP_GET_EXT_FILE_NAME, url);
|