@lynker-desktop/electron-window-manager 0.0.4-alpha.6 → 0.0.4-alpha.61
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/common/index.d.ts +10 -1
- package/common/index.d.ts.map +1 -1
- package/esm/common/index.d.ts +10 -1
- package/esm/common/index.d.ts.map +1 -1
- package/esm/main/index.d.ts +10 -8
- package/esm/main/index.d.ts.map +1 -1
- package/esm/main/index.js +184 -64
- package/esm/main/index.js.map +1 -1
- package/esm/renderer/index.d.ts +36 -6
- package/esm/renderer/index.d.ts.map +1 -1
- package/esm/renderer/index.js +54 -28
- package/esm/renderer/index.js.map +1 -1
- package/main/index.d.ts +10 -8
- package/main/index.d.ts.map +1 -1
- package/main/index.js +183 -62
- package/main/index.js.map +1 -1
- package/package.json +2 -2
- package/renderer/index.d.ts +36 -6
- package/renderer/index.d.ts.map +1 -1
- package/renderer/index.js +56 -29
- package/renderer/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,KAAK,EAAC,aAAa,EAAc,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,KAAK,EAAC,aAAa,EAAc,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAI1D,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAsBD;;;;GAIG;AACH,eAAO,MAAM,MAAM,YAAmB,6BAA6B,KAAG,OAAO,CAAC,iBAAiB,CAW9F,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,8CAI5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,aAAoB,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAW1F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,QAAa,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAmBrE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,aAAoB,MAAM,GAAG,MAAM,KAAG,OAAO,CAAC,OAAO,CAGtE,CAAA;AAED,eAAO,MAAM,QAAQ,QAAa,OAAO,CAAC,OAAO,CAGhD,CAAA;AAED;;EAEE;AACF,eAAO,MAAM,wBAAwB,iBAAwB,MAAM,2CAGlE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,QAEH,OAAO,CAAC,MAAM,GAAG,SAAS,CAc1C,CAAA"}
|
package/esm/renderer/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const getIpc = () => {
|
|
|
6
6
|
return window?.__ELECTRON_WINDOW_MANAGER__?.ipcRenderer || window?.require('electron').ipcRenderer;
|
|
7
7
|
}
|
|
8
8
|
catch (error) {
|
|
9
|
-
console.error('
|
|
9
|
+
console.error('当前非桌面端环境, 请在桌面端中调用');
|
|
10
10
|
return {};
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -20,40 +20,52 @@ const getRemote = () => {
|
|
|
20
20
|
return {};
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* 创建窗口
|
|
25
|
+
* @param options
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
23
28
|
const create = async (options) => {
|
|
24
29
|
const remote = getRemote();
|
|
25
30
|
const data = await eIpc.RendererIPC.invokeMain('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'create', data: options });
|
|
26
|
-
const
|
|
27
|
-
const win = allW.find(i => i.id === data.winId);
|
|
31
|
+
const win = remote.BrowserWindow.fromId(data.winId);
|
|
28
32
|
if (win) {
|
|
29
33
|
// @ts-ignore
|
|
30
|
-
win && (win['_name'] = data.winName);
|
|
34
|
+
win && (win['_name'] = `${data.winName}`);
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
win && (win['_extraData'] = `${data.winExtraData || ''}`);
|
|
31
37
|
}
|
|
32
38
|
return win;
|
|
33
39
|
};
|
|
34
|
-
|
|
40
|
+
/**
|
|
41
|
+
* 获取当前窗口实例
|
|
42
|
+
*/
|
|
43
|
+
const getCurrentWindow = async () => {
|
|
35
44
|
const remote = getRemote();
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const win = allW.find(i => i.id === data.winId);
|
|
39
|
-
console.error(allW, data, win);
|
|
40
|
-
if (win) {
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
win && (win['_name'] = data.winName);
|
|
43
|
-
}
|
|
44
|
-
return win;
|
|
45
|
+
const winId = remote.getCurrentWindow().id;
|
|
46
|
+
return get(winId);
|
|
45
47
|
};
|
|
46
|
-
|
|
48
|
+
/**
|
|
49
|
+
* 获取窗口
|
|
50
|
+
* @param idOrName id或者名字
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
const get = async (idOrName) => {
|
|
47
54
|
const remote = getRemote();
|
|
48
|
-
const data = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: '
|
|
49
|
-
const
|
|
50
|
-
const win = allW.find(i => i.id === data.winId);
|
|
55
|
+
const data = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'get', data: idOrName });
|
|
56
|
+
const win = remote.BrowserWindow.fromId(data.winId);
|
|
51
57
|
if (win) {
|
|
52
58
|
// @ts-ignore
|
|
53
|
-
win && (win['_name'] = data.winName);
|
|
59
|
+
win && (win['_name'] = `${data.winName || ''}`);
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
win && (win['_extraData'] = `${data.winExtraData || ''}`);
|
|
54
62
|
}
|
|
55
63
|
return win;
|
|
56
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* 获取所有窗口
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
57
69
|
const getAll = async () => {
|
|
58
70
|
const remote = getRemote();
|
|
59
71
|
const data = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'getAll', data: undefined });
|
|
@@ -62,23 +74,37 @@ const getAll = async () => {
|
|
|
62
74
|
for (const key in data) {
|
|
63
75
|
const element = data[key];
|
|
64
76
|
const win = allW.find(i => {
|
|
65
|
-
return `${i.id}` === `${element
|
|
77
|
+
return `${i.id}` === `${element?.winId}`;
|
|
66
78
|
});
|
|
67
79
|
if (win) {
|
|
68
80
|
// @ts-ignore
|
|
69
|
-
win && (win['_name'] = element
|
|
81
|
+
win && (win['_name'] = `${element?.winName || ''}`);
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
win && (win['_extraData'] = `${element?.winExtraData || ''}`);
|
|
70
84
|
wins.set(key, win);
|
|
71
85
|
}
|
|
72
86
|
}
|
|
73
87
|
return wins;
|
|
74
88
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
/**
|
|
90
|
+
* 关闭窗口
|
|
91
|
+
* @param name
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
const close = async (idOrName) => {
|
|
95
|
+
await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'close', data: idOrName });
|
|
96
|
+
return true;
|
|
97
|
+
};
|
|
98
|
+
const closeAll = async () => {
|
|
99
|
+
await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'closeAll', data: undefined });
|
|
100
|
+
return true;
|
|
78
101
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
102
|
+
/**
|
|
103
|
+
* 用webContentIds查找到window
|
|
104
|
+
*/
|
|
105
|
+
const getWindowForWebContentId = async (webContentId) => {
|
|
106
|
+
const winId = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', { type: 'getWindowForWebContentId', data: webContentId });
|
|
107
|
+
return get(winId);
|
|
82
108
|
};
|
|
83
109
|
/**
|
|
84
110
|
* 获取 preload
|
|
@@ -112,5 +138,5 @@ getPreload();
|
|
|
112
138
|
// document.body.addEventListener('keydown', handleOpenDevTools)
|
|
113
139
|
// }
|
|
114
140
|
|
|
115
|
-
export { close,
|
|
141
|
+
export { close, closeAll, create, get, getAll, getCurrentWindow, getPreload, getWindowForWebContentId };
|
|
116
142
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/renderer/index.ts"],"sourcesContent":["/** Used in Renderer process */\nimport type {BrowserWindow, IpcRenderer} from 'electron'\nimport { ElectronWindowsManagerOptions } from '../common';\nimport type RemoteType from '@electron/remote'\nimport
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/renderer/index.ts"],"sourcesContent":["/** Used in Renderer process */\nimport type {BrowserWindow, IpcRenderer} from 'electron'\nimport { ElectronWindowsManagerOptions } from '../common';\nimport type RemoteType from '@electron/remote'\nimport eIpc from '@lynker-desktop/electron-ipc/renderer'\n\nexport interface BrowserWindowType extends BrowserWindow {\n _name: string;\n _extraData: string;\n}\n\nconst getIpc = (): IpcRenderer => {\n try {\n // @ts-ignore\n return window?.__ELECTRON_WINDOW_MANAGER__?.ipcRenderer || window?.require('electron').ipcRenderer\n } catch (error) {\n console.error('当前非桌面端环境, 请在桌面端中调用');\n return {} as IpcRenderer;\n }\n}\n\nconst getRemote = (): typeof RemoteType => {\n try {\n // @ts-ignore\n return window?.__ELECTRON_WINDOW_MANAGER__?.remote || window?.require('@electron/remote')\n } catch (error) {\n console.error('getIpc error: ', error)\n return {} as typeof RemoteType;\n }\n}\n\n/**\n * 创建窗口\n * @param options\n * @returns\n */\nexport const create = async (options: ElectronWindowsManagerOptions): Promise<BrowserWindowType> => {\n const remote = getRemote()\n const data: {winId: number; winName: string} = await eIpc.RendererIPC.invokeMain('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'create', data: options})\n const win = remote.BrowserWindow.fromId(data.winId)! as BrowserWindowType;\n if (win) {\n // @ts-ignore\n win && (win['_name'] = `${data.winName}`);\n // @ts-ignore\n win && (win['_extraData'] = `${data.winExtraData || ''}`);\n }\n return win;\n}\n\n/**\n * 获取当前窗口实例\n */\nexport const getCurrentWindow = async () => {\n const remote = getRemote();\n const winId = remote.getCurrentWindow().id;\n return get(winId);\n}\n\n/**\n * 获取窗口\n * @param idOrName id或者名字\n * @returns\n */\nexport const get = async (idOrName: string | number): Promise<BrowserWindowType | undefined> => {\n const remote = getRemote()\n const data: {winId: number; winName: string, winExtraData: string} = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'get', data: idOrName})\n const win = remote.BrowserWindow.fromId(data.winId)! as BrowserWindowType;\n if (win) {\n // @ts-ignore\n win && (win['_name'] = `${data.winName || ''}`);\n // @ts-ignore\n win && (win['_extraData'] = `${data.winExtraData|| ''}`);\n }\n return win;\n}\n\n/**\n * 获取所有窗口\n * @returns\n */\nexport const getAll = async (): Promise<Map<number, BrowserWindowType>> => {\n const remote = getRemote()\n const data = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'getAll', data: undefined})\n const wins = new Map();\n const allW = remote.BrowserWindow.getAllWindows()\n for (const key in data) {\n const element = data[key];\n const win = allW.find(i => {\n return `${i.id}` === `${element?.winId}`\n })\n if (win) {\n // @ts-ignore\n win && (win['_name'] = `${element?.winName || ''}`);\n // @ts-ignore\n win && (win['_extraData'] = `${element?.winExtraData|| ''}`);\n wins.set(key, win)\n }\n }\n return wins;\n}\n\n/**\n * 关闭窗口\n * @param name\n * @returns\n */\nexport const close = async (idOrName: string | number): Promise<boolean> => {\n await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'close', data: idOrName})\n return true;\n}\n\nexport const closeAll = async (): Promise<boolean> => {\n await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'closeAll', data: undefined})\n return true;\n}\n\n/**\n * 用webContentIds查找到window\n*/\nexport const getWindowForWebContentId = async (webContentId: number) => {\n const winId = await getIpc().invoke('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', {type: 'getWindowForWebContentId', data: webContentId})\n return get(winId);\n}\n\n/**\n * 获取 preload\n * @returns\n */\nexport const getPreload = (() => {\n let cachePreload: undefined | string = undefined;\n return async (): Promise<string | undefined> => {\n if (cachePreload) {\n return cachePreload;\n }\n const data: string | undefined = await getIpc().invoke(\n '__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__',\n {\n type: 'getPreload',\n data: undefined,\n }\n )\n cachePreload = data;\n return data;\n }\n})()\n\ngetPreload();\n\n// const handleOpenDevTools = (e: HTMLElement, ev: KeyboardEvent): any => {\n// const remote = getRemote()\n// const webContents = remote.getCurrentWebContents()\n// webContents.openDevTools({\n// mode: 'detach'\n// })\n// return '';\n// }\n\n// export const registerDevTools = () => {\n// document.body.removeEventListener('keydown', handleOpenDevTools)\n// document.body.addEventListener('keydown', handleOpenDevTools)\n// }\n"],"names":[],"mappings":";;AAWA,MAAM,MAAM,GAAG,MAAkB;AAC/B,IAAA,IAAI;;AAEF,QAAA,OAAO,MAAM,EAAE,2BAA2B,EAAE,WAAW,IAAI,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAA;KACnG;IAAC,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;AACpC,QAAA,OAAO,EAAiB,CAAC;KAC1B;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,MAAwB;AACxC,IAAA,IAAI;;AAEF,QAAA,OAAO,MAAM,EAAE,2BAA2B,EAAE,MAAM,IAAI,M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AACE,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,IAAI,EAAE,SAAS;AAChB,SAAA,CACF,CAAA;QACD,YAAY,GAAG,IAAI,CAAC;AACpB,QAAA,OAAO,IAAI,CAAC;AACd,KAAC,CAAA;AACH,CAAC,IAAG;AAEJ,UAAU,EAAE,CAAC;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;"}
|
package/main/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { WebContents } from 'electron';
|
|
2
2
|
import type { ElectronWindowsManagerOptions, WindowItem } from '../common';
|
|
3
|
+
export declare const getCustomSession: () => Electron.Session;
|
|
3
4
|
export declare const enable: (win: WebContents) => void;
|
|
4
5
|
export declare class WindowsManager {
|
|
6
|
+
loadingViewUrl: string | undefined;
|
|
7
|
+
errorViewUrl: string | undefined;
|
|
5
8
|
preload?: string;
|
|
6
|
-
windows: Map<number, WindowItem>;
|
|
7
|
-
constructor(preload?: string);
|
|
9
|
+
windows: Map<number, WindowItem | null>;
|
|
10
|
+
constructor(preload?: string, loadingViewUrl?: string, errorViewUrl?: string);
|
|
8
11
|
create(options: ElectronWindowsManagerOptions): WindowItem;
|
|
9
12
|
_setLoadingView(window: WindowItem, createOptions: ElectronWindowsManagerOptions): void;
|
|
10
|
-
get(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
closeById(id: number): undefined;
|
|
13
|
+
get(idOrName: string | number): WindowItem | undefined;
|
|
14
|
+
getAll(): Map<number, WindowItem | null>;
|
|
15
|
+
close(idOrName: string | number): undefined;
|
|
16
|
+
closeAll(): void;
|
|
15
17
|
getPreload(): string | undefined;
|
|
16
18
|
}
|
|
17
19
|
export declare let isInitialized: boolean;
|
|
18
|
-
export declare const initialize: (preload?: string) => WindowsManager;
|
|
20
|
+
export declare const initialize: (preload?: string, loadingViewUrl?: string, errorViewUrl?: string) => WindowsManager;
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/main/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,WAAW,EAAkE,MAAM,UAAU,CAAA;AAGvI,OAAO,KAAK,EAAE,6BAA6B,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3E,eAAO,MAAM,gBAAgB,wBAQzB,CAAC;AAUL,eAAO,MAAM,MAAM,QAAS,WAAW,SAEtC,CAAA;AAED,qBAAa,cAAc;IACzB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC,CAAC;gBAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAO5E,MAAM,CAAC,OAAO,EAAE,6BAA6B;IA4G7C,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,6BAA6B;IAmFhF,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS;IA+BtD,MAAM;IAYN,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAoB/B,QAAQ;IAQR,UAAU;CAIX;AAID,eAAO,IAAI,aAAa,SAAQ,CAAC;AAEjC,eAAO,MAAM,UAAU,aAAc,MAAM,mBAAmB,MAAM,iBAAiB,MAAM,KAAG,cA4H7F,CAAA"}
|
package/main/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const lodash = require('lodash');
|
|
2
2
|
const electron = require('electron');
|
|
3
3
|
const remote = require('@electron/remote/main');
|
|
4
4
|
const eIpc = require('@lynker-desktop/electron-ipc/main');
|
|
@@ -16,6 +16,18 @@ function _interopNamespaceDefault(e) {
|
|
|
16
16
|
|
|
17
17
|
const remote__namespace = /*#__PURE__*/_interopNamespaceDefault(remote);
|
|
18
18
|
|
|
19
|
+
const getCustomSession = (() => {
|
|
20
|
+
let customSession;
|
|
21
|
+
return () => {
|
|
22
|
+
if (!customSession) {
|
|
23
|
+
customSession = electron.session.fromPartition('persist:__global_main_session__');
|
|
24
|
+
}
|
|
25
|
+
return customSession;
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
electron.app.on('ready', () => {
|
|
29
|
+
getCustomSession();
|
|
30
|
+
});
|
|
19
31
|
if (!remote__namespace.isInitialized()) {
|
|
20
32
|
remote__namespace.initialize();
|
|
21
33
|
}
|
|
@@ -23,16 +35,49 @@ const enable = (win) => {
|
|
|
23
35
|
remote__namespace.enable(win);
|
|
24
36
|
};
|
|
25
37
|
class WindowsManager {
|
|
26
|
-
constructor(preload) {
|
|
38
|
+
constructor(preload, loadingViewUrl, errorViewUrl) {
|
|
27
39
|
this.preload = preload;
|
|
28
40
|
this.windows = new Map();
|
|
41
|
+
this.loadingViewUrl = `${loadingViewUrl ?? ''}`;
|
|
42
|
+
this.errorViewUrl = `${errorViewUrl ?? ''}`;
|
|
29
43
|
}
|
|
30
44
|
create(options) {
|
|
31
|
-
const { name = 'anonymous',
|
|
32
|
-
|
|
45
|
+
const { name = 'anonymous', url, loadingView = { url: undefined }, errorView = { url: undefined }, browserWindow: browserWindowOptions, openDevTools = false, preventOriginClose = false, } = options;
|
|
46
|
+
try {
|
|
47
|
+
loadingView.url = `${loadingView?.url ?? this.loadingViewUrl}`;
|
|
48
|
+
lodash.merge(options, {
|
|
49
|
+
loadingView,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
log('error', 'loadingView error:', loadingView, this.loadingViewUrl);
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
errorView.url = `${errorView?.url ?? this.errorViewUrl}`;
|
|
57
|
+
lodash.merge(options, {
|
|
58
|
+
errorView,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
log('error', 'errorView error:', errorView, this.errorViewUrl);
|
|
63
|
+
}
|
|
64
|
+
log('log', 'create', options);
|
|
65
|
+
let parentWin = undefined;
|
|
66
|
+
if (typeof browserWindowOptions?.parent === 'number') {
|
|
67
|
+
parentWin = electron.BrowserWindow.fromId(browserWindowOptions?.parent) || undefined;
|
|
68
|
+
if (parentWin) {
|
|
69
|
+
browserWindowOptions.parent = parentWin;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
browserWindowOptions.parent = undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const window = new electron.BrowserWindow(lodash.merge({
|
|
33
76
|
acceptFirstMouse: true,
|
|
34
|
-
}, browserWindowOptions, {
|
|
77
|
+
}, (browserWindowOptions || {}), {
|
|
78
|
+
parent: parentWin,
|
|
35
79
|
webPreferences: {
|
|
80
|
+
// session: getCustomSession(),
|
|
36
81
|
plugins: true,
|
|
37
82
|
nodeIntegration: true,
|
|
38
83
|
contextIsolation: false,
|
|
@@ -44,14 +89,35 @@ class WindowsManager {
|
|
|
44
89
|
}));
|
|
45
90
|
remote__namespace.enable(window.webContents);
|
|
46
91
|
window._name = name;
|
|
92
|
+
window._extraData = `${options?.extraData || ''}`;
|
|
47
93
|
if (loadingView?.url) {
|
|
48
94
|
this._setLoadingView(window, options);
|
|
49
95
|
}
|
|
50
|
-
|
|
96
|
+
if (errorView?.url) {
|
|
97
|
+
const showErrorView = lodash.debounce(() => {
|
|
98
|
+
const _url = window.webContents.getURL() || url;
|
|
99
|
+
window.webContents.executeJavaScript(`window['__ELECTRON_WINDOW_MANAGER_DID_FAIL_LOAD_URL__'] = "${_url}"`);
|
|
100
|
+
window.loadURL(`${errorView?.url}`);
|
|
101
|
+
}, 1000 * 3);
|
|
102
|
+
window.webContents.on('did-fail-load', () => {
|
|
103
|
+
showErrorView();
|
|
104
|
+
});
|
|
105
|
+
window.webContents.on('did-start-loading', () => {
|
|
106
|
+
showErrorView.cancel();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
window.addListener('close', (event) => {
|
|
110
|
+
log('log', 'close', window.id, window._name);
|
|
111
|
+
this.windows.set(window.id, null);
|
|
112
|
+
this.windows.delete(window.id);
|
|
51
113
|
if (preventOriginClose) {
|
|
52
114
|
event.preventDefault();
|
|
53
115
|
return;
|
|
54
116
|
}
|
|
117
|
+
});
|
|
118
|
+
window.addListener('closed', () => {
|
|
119
|
+
log('log', 'closed', window.id, window._name);
|
|
120
|
+
this.windows.set(window.id, null);
|
|
55
121
|
this.windows.delete(window.id);
|
|
56
122
|
});
|
|
57
123
|
window.webContents.on('dom-ready', () => {
|
|
@@ -60,12 +126,7 @@ class WindowsManager {
|
|
|
60
126
|
}
|
|
61
127
|
});
|
|
62
128
|
this.windows.set(window.id, window);
|
|
63
|
-
|
|
64
|
-
window.loadFile(options.url);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
window.loadURL(options.url);
|
|
68
|
-
}
|
|
129
|
+
window.loadURL(options.url);
|
|
69
130
|
window.focus();
|
|
70
131
|
return window;
|
|
71
132
|
}
|
|
@@ -74,6 +135,7 @@ class WindowsManager {
|
|
|
74
135
|
const { loadingView, preventOriginNavigate = false, } = createOptions;
|
|
75
136
|
let _loadingView = new electron.BrowserView({
|
|
76
137
|
webPreferences: {
|
|
138
|
+
// session: getCustomSession(),
|
|
77
139
|
contextIsolation: false,
|
|
78
140
|
nodeIntegration: true,
|
|
79
141
|
// 允许loadURL与文件路径在开发环境
|
|
@@ -92,9 +154,10 @@ class WindowsManager {
|
|
|
92
154
|
width: viewWidth || 10,
|
|
93
155
|
height: viewHeight || 10,
|
|
94
156
|
});
|
|
157
|
+
log('log', 'loadLoadingView', window._name, loadingView);
|
|
95
158
|
_loadingView.webContents.loadURL(loadingView?.url || '');
|
|
96
159
|
};
|
|
97
|
-
const onFailure = () => {
|
|
160
|
+
const onFailure = lodash.debounce(() => {
|
|
98
161
|
if (_loadingView.webContents && !_loadingView.webContents.isDestroyed()) {
|
|
99
162
|
_loadingView.webContents.close();
|
|
100
163
|
}
|
|
@@ -104,9 +167,9 @@ class WindowsManager {
|
|
|
104
167
|
if (window) {
|
|
105
168
|
window.removeBrowserView(_loadingView);
|
|
106
169
|
}
|
|
107
|
-
};
|
|
170
|
+
}, 300);
|
|
108
171
|
loadLoadingView();
|
|
109
|
-
window.on('resize',
|
|
172
|
+
window.on('resize', lodash.debounce(() => {
|
|
110
173
|
if (_loadingView.webContents && !_loadingView.webContents.isDestroyed()) {
|
|
111
174
|
if (window.isDestroyed()) {
|
|
112
175
|
return;
|
|
@@ -136,34 +199,65 @@ class WindowsManager {
|
|
|
136
199
|
window.webContents.on('crashed', onFailure);
|
|
137
200
|
window.webContents.on('unresponsive', onFailure);
|
|
138
201
|
window.webContents.on('did-fail-load', onFailure);
|
|
202
|
+
window.webContents.on('did-finish-load', onFailure);
|
|
203
|
+
window.webContents.on('did-stop-loading', onFailure);
|
|
139
204
|
}
|
|
140
205
|
}
|
|
141
|
-
get(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
206
|
+
get(idOrName) {
|
|
207
|
+
log('log', 'get', idOrName);
|
|
208
|
+
let win;
|
|
209
|
+
this.windows.forEach((i, key) => {
|
|
210
|
+
try {
|
|
211
|
+
if (!(i && i?.webContents?.isDestroyed && !i?.webContents?.isDestroyed?.())) {
|
|
212
|
+
this.windows.set(key, null);
|
|
213
|
+
this.windows.delete(key);
|
|
214
|
+
i = null;
|
|
215
|
+
}
|
|
146
216
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
217
|
+
catch (error) {
|
|
218
|
+
log('error', 'get');
|
|
219
|
+
}
|
|
220
|
+
if (typeof idOrName === 'number') {
|
|
221
|
+
if (i?.id === idOrName) {
|
|
222
|
+
win = i;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else if (typeof idOrName === 'string') {
|
|
226
|
+
if (i?._name === idOrName) {
|
|
227
|
+
win = i;
|
|
228
|
+
}
|
|
155
229
|
}
|
|
156
230
|
});
|
|
157
|
-
|
|
231
|
+
// @ts-ignore
|
|
232
|
+
if (win && win?.webContents?.isDestroyed && !win?.webContents?.isDestroyed?.()) {
|
|
233
|
+
return win;
|
|
234
|
+
}
|
|
235
|
+
return undefined;
|
|
158
236
|
}
|
|
159
237
|
getAll() {
|
|
238
|
+
log('log', 'getAll');
|
|
239
|
+
this.windows.forEach((win, key) => {
|
|
240
|
+
console.log(key, win);
|
|
241
|
+
if (!(win && win?.webContents?.isDestroyed && !win?.webContents?.isDestroyed?.())) {
|
|
242
|
+
this.windows.set(key, null);
|
|
243
|
+
this.windows.delete(key);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
160
246
|
return this.windows;
|
|
161
247
|
}
|
|
162
|
-
close(
|
|
248
|
+
close(idOrName) {
|
|
249
|
+
log('log', 'close', idOrName);
|
|
163
250
|
let win = undefined;
|
|
164
251
|
this.windows.forEach((i) => {
|
|
165
|
-
if (
|
|
166
|
-
|
|
252
|
+
if (typeof idOrName === 'number') {
|
|
253
|
+
if (i?.id === idOrName) {
|
|
254
|
+
win = i;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else if (typeof idOrName === 'string') {
|
|
258
|
+
if (i?._name === idOrName) {
|
|
259
|
+
win = i;
|
|
260
|
+
}
|
|
167
261
|
}
|
|
168
262
|
});
|
|
169
263
|
// @ts-ignore
|
|
@@ -171,26 +265,22 @@ class WindowsManager {
|
|
|
171
265
|
// @ts-ignore
|
|
172
266
|
return win && win?.destroy();
|
|
173
267
|
}
|
|
174
|
-
|
|
175
|
-
|
|
268
|
+
closeAll() {
|
|
269
|
+
log('log', 'closeAll');
|
|
176
270
|
this.windows.forEach((i) => {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
271
|
+
i && this.windows.delete(i?.id);
|
|
272
|
+
i && i?.destroy();
|
|
180
273
|
});
|
|
181
|
-
// @ts-ignore
|
|
182
|
-
win && this.windows.delete(win?.id);
|
|
183
|
-
// @ts-ignore
|
|
184
|
-
return win && win?.destroy();
|
|
185
274
|
}
|
|
186
275
|
getPreload() {
|
|
276
|
+
log('log', 'getPreload');
|
|
187
277
|
return this.preload;
|
|
188
278
|
}
|
|
189
279
|
}
|
|
190
280
|
// @ts-ignore
|
|
191
281
|
global['__ELECTRON_WINDOWS_MANAGER__'] = undefined;
|
|
192
282
|
exports.isInitialized = false;
|
|
193
|
-
const initialize = (preload) => {
|
|
283
|
+
const initialize = (preload, loadingViewUrl, errorViewUrl) => {
|
|
194
284
|
// @ts-ignore
|
|
195
285
|
if (exports.isInitialized && global['__ELECTRON_WINDOWS_MANAGER__']) {
|
|
196
286
|
// @ts-ignore
|
|
@@ -198,7 +288,7 @@ const initialize = (preload) => {
|
|
|
198
288
|
}
|
|
199
289
|
exports.isInitialized = true;
|
|
200
290
|
// @ts-ignore
|
|
201
|
-
const wm = global['__ELECTRON_WINDOWS_MANAGER__'] = new WindowsManager(preload);
|
|
291
|
+
const wm = global['__ELECTRON_WINDOWS_MANAGER__'] = new WindowsManager(preload, loadingViewUrl, errorViewUrl);
|
|
202
292
|
eIpc.mainIPC.handleRenderer('__ELECTRON_WINDOW_MANAGER_IPC_CHANNEL__', async (data) => {
|
|
203
293
|
if (data?.type === 'create') {
|
|
204
294
|
const opt = data;
|
|
@@ -206,30 +296,25 @@ const initialize = (preload) => {
|
|
|
206
296
|
if (findWin) {
|
|
207
297
|
findWin.focus();
|
|
208
298
|
return {
|
|
209
|
-
winId: findWin?.id,
|
|
210
|
-
winName: findWin?._name
|
|
299
|
+
winId: Number(`${findWin?.id || -1}`),
|
|
300
|
+
winName: `${findWin?._name || ''}`,
|
|
301
|
+
winExtraData: `${findWin?._extraData || ''}`,
|
|
211
302
|
};
|
|
212
303
|
}
|
|
213
304
|
const res = wm.create(opt.data);
|
|
214
305
|
return {
|
|
215
|
-
winId: Number(res.id),
|
|
216
|
-
winName: res
|
|
306
|
+
winId: Number(`${res.id || -1}`),
|
|
307
|
+
winName: `${res?._name || ''}`,
|
|
308
|
+
winExtraData: `${res?._extraData || ''}`,
|
|
217
309
|
};
|
|
218
310
|
}
|
|
219
311
|
if (data?.type === 'get') {
|
|
220
312
|
const opt = data;
|
|
221
313
|
const res = wm.get(opt?.data);
|
|
222
314
|
return {
|
|
223
|
-
winId:
|
|
224
|
-
winName: res?._name
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
if (data?.type === 'getById') {
|
|
228
|
-
const opt = data;
|
|
229
|
-
const res = wm.getById(opt?.data);
|
|
230
|
-
return {
|
|
231
|
-
winId: res?.id ? Number(res?.id) : -1,
|
|
232
|
-
winName: res?._name ? res?._name : '',
|
|
315
|
+
winId: Number(`${res?.id || -1}`),
|
|
316
|
+
winName: `${res?._name || ''}`,
|
|
317
|
+
winExtraData: `${res?._extraData || ''}`,
|
|
233
318
|
};
|
|
234
319
|
}
|
|
235
320
|
if (data?.type === 'getAll') {
|
|
@@ -238,8 +323,9 @@ const initialize = (preload) => {
|
|
|
238
323
|
res.forEach(i => {
|
|
239
324
|
// @ts-ignore
|
|
240
325
|
obj[i.id] = {
|
|
241
|
-
winId:
|
|
242
|
-
winName: i?._name
|
|
326
|
+
winId: Number(`${i?.id || -1}`),
|
|
327
|
+
winName: `${i?._name || ''}`,
|
|
328
|
+
winExtraData: `${i?._extraData || ''}`,
|
|
243
329
|
};
|
|
244
330
|
});
|
|
245
331
|
return obj;
|
|
@@ -249,11 +335,36 @@ const initialize = (preload) => {
|
|
|
249
335
|
const res = wm.close(opt?.data);
|
|
250
336
|
return res;
|
|
251
337
|
}
|
|
252
|
-
if (data?.type === '
|
|
253
|
-
const
|
|
254
|
-
const res = wm.closeById(opt?.data);
|
|
338
|
+
if (data?.type === 'closeAll') {
|
|
339
|
+
const res = wm.closeAll();
|
|
255
340
|
return res;
|
|
256
341
|
}
|
|
342
|
+
if (data?.type === 'getWindowForWebContentId') {
|
|
343
|
+
const opt = data;
|
|
344
|
+
const targetWebContents = electron.webContents.fromId(opt.data);
|
|
345
|
+
if (targetWebContents) {
|
|
346
|
+
let win = electron.BrowserWindow.fromWebContents(targetWebContents);
|
|
347
|
+
if (!win) {
|
|
348
|
+
// 获取所有的 BrowserWindows
|
|
349
|
+
let allWindows = electron.BrowserWindow.getAllWindows();
|
|
350
|
+
// 遍历所有窗口,检查每个窗口的 BrowserView
|
|
351
|
+
for (let _win of allWindows) {
|
|
352
|
+
let views = _win.getBrowserViews();
|
|
353
|
+
// 遍历窗口的所有 BrowserView
|
|
354
|
+
for (let view of views) {
|
|
355
|
+
if (view.webContents === targetWebContents) {
|
|
356
|
+
win = _win;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (win)
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return win?.id;
|
|
365
|
+
}
|
|
366
|
+
return undefined;
|
|
367
|
+
}
|
|
257
368
|
if (data?.type === 'getPreload') {
|
|
258
369
|
const res = wm.getPreload();
|
|
259
370
|
return res;
|
|
@@ -262,8 +373,18 @@ const initialize = (preload) => {
|
|
|
262
373
|
});
|
|
263
374
|
return wm;
|
|
264
375
|
};
|
|
376
|
+
const log = (type, ...data) => {
|
|
377
|
+
const key = `[electron-window-manager]: `;
|
|
378
|
+
try {
|
|
379
|
+
console[type](key, ...data);
|
|
380
|
+
}
|
|
381
|
+
catch (error) {
|
|
382
|
+
console.error(key, error);
|
|
383
|
+
}
|
|
384
|
+
};
|
|
265
385
|
|
|
266
386
|
exports.WindowsManager = WindowsManager;
|
|
267
387
|
exports.enable = enable;
|
|
388
|
+
exports.getCustomSession = getCustomSession;
|
|
268
389
|
exports.initialize = initialize;
|
|
269
390
|
//# sourceMappingURL=index.js.map
|