MCPcopy
hub / github.com/wavetermdev/waveterm / makeAppMenuItems

Function makeAppMenuItems

emain/emain-menu.ts:174–201  ·  view source on GitHub ↗
(webContents: electron.WebContents)

Source from the content-addressed store, hash-verified

172}
173
174function 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
203function makeViewMenu(
204 webContents: electron.WebContents,

Callers 1

makeFullAppMenuFunction · 0.85

Calls 4

fireAndForgetFunction · 0.90
getWindowWebContentsFunction · 0.85
checkForUpdatesMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected