MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / showNotification

Method showNotification

src/main/api/plugin/ui.ts:77–94  ·  view source on GitHub ↗
(event: Electron.IpcMainInvokeEvent, body: string)

Source from the content-addressed store, hash-verified

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 // 检查是否在分离窗口中

Callers 2

setupIPCMethod · 0.95
allCodeEvent.tsFile · 0.45

Calls 2

showMethod · 0.80

Tested by

no test coverage detected