MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / installAppMenu

Function installAppMenu

apps/desktop/src/main/index.ts:3127–3277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3125}
3126
3127function installAppMenu(): void {
3128 if (!isMac()) {
3129 // On Windows/Linux we keep `autoHideMenuBar: true` and skip the menu.
3130 Menu.setApplicationMenu(null)
3131 return
3132 }
3133 const template: Electron.MenuItemConstructorOptions[] = [
3134 {
3135 label: 'ZenNotes',
3136 submenu: [
3137 { label: 'About ZenNotes', role: 'about' },
3138 { type: 'separator' },
3139 {
3140 label: 'Check for Updates…',
3141 click: () => {
3142 void runMenuUpdateCheck()
3143 }
3144 },
3145 { type: 'separator' },
3146 {
3147 label: 'Settings…',
3148 accelerator: 'CmdOrCtrl+,',
3149 click: () => {
3150 const target = BrowserWindow.getFocusedWindow() ?? mainWindow
3151 target?.webContents.send(IPC.APP_OPEN_SETTINGS)
3152 }
3153 },
3154 { type: 'separator' },
3155 { role: 'services' },
3156 { type: 'separator' },
3157 { role: 'hide', label: 'Hide ZenNotes' },
3158 { role: 'hideOthers' },
3159 { role: 'unhide' },
3160 { type: 'separator' },
3161 { role: 'quit', label: 'Quit ZenNotes' }
3162 ]
3163 },
3164 {
3165 label: 'File',
3166 submenu: [
3167 {
3168 label: 'Open Vault in New Window…',
3169 accelerator: 'CmdOrCtrl+Shift+O',
3170 click: () => {
3171 void openVaultInNewWindow(BrowserWindow.getFocusedWindow() ?? mainWindow)
3172 }
3173 }
3174 ]
3175 },
3176 {
3177 label: 'Edit',
3178 submenu: [
3179 { role: 'undo' },
3180 { role: 'redo' },
3181 { type: 'separator' },
3182 { role: 'cut' },
3183 { role: 'copy' },
3184 { role: 'paste' },

Callers 1

index.tsFile · 0.85

Calls 7

isMacFunction · 0.85
runMenuUpdateCheckFunction · 0.85
openVaultInNewWindowFunction · 0.85
setWindowZoomFunction · 0.85
adjustWindowZoomFunction · 0.85
openAllowedExternalUrlFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected