(event: Electron.IpcMainInvokeEvent, body: string)
| 75 | } |
| 76 | |
| 77 | private showNotification(event: Electron.IpcMainInvokeEvent, body: string): void { |
| 78 | if (Notification.isSupported()) { |
| 79 | const options: Electron.NotificationConstructorOptions = { |
| 80 | title: 'ZTools', |
| 81 | body: body |
| 82 | } |
| 83 | |
| 84 | const pluginInfo = this.pluginManager?.getPluginInfoByWebContents(event.sender) |
| 85 | if (pluginInfo) { |
| 86 | options.title = pluginInfo.name |
| 87 | if (pluginInfo.logo) { |
| 88 | options.icon = fileURLToPath(pluginInfo.logo) |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | new Notification(options).show() |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | private setExpendHeight(event: Electron.IpcMainInvokeEvent, height: number): void { |
| 97 | // 检查是否在分离窗口中 |
no test coverage detected