(webContents: electron.WebContents)
| 172 | } |
| 173 | |
| 174 | function makeAppMenuItems(webContents: electron.WebContents): Electron.MenuItemConstructorOptions[] { |
| 175 | const appMenuItems: Electron.MenuItemConstructorOptions[] = [ |
| 176 | { |
| 177 | label: "About Wave Terminal", |
| 178 | click: (_, window) => { |
| 179 | (getWindowWebContents(window) ?? webContents)?.send("menu-item-about"); |
| 180 | }, |
| 181 | }, |
| 182 | { |
| 183 | label: "Check for Updates", |
| 184 | click: () => { |
| 185 | fireAndForget(() => updater?.checkForUpdates(true)); |
| 186 | }, |
| 187 | }, |
| 188 | { type: "separator" }, |
| 189 | ]; |
| 190 | if (unamePlatform === "darwin") { |
| 191 | appMenuItems.push( |
| 192 | { role: "services" }, |
| 193 | { type: "separator" }, |
| 194 | { role: "hide" }, |
| 195 | { role: "hideOthers" }, |
| 196 | { type: "separator" } |
| 197 | ); |
| 198 | } |
| 199 | appMenuItems.push({ role: "quit" }); |
| 200 | return appMenuItems; |
| 201 | } |
| 202 | |
| 203 | function makeViewMenu( |
| 204 | webContents: electron.WebContents, |
no test coverage detected