copy paste
Some checks failed
CI / check (push) Has been cancelled

This commit is contained in:
2026-06-17 13:40:49 +02:00
parent 16296a27da
commit 42defcc7cd
11 changed files with 104 additions and 22 deletions

View File

@@ -141,7 +141,31 @@ function buildAppMenu(): Menu {
],
},
{ role: 'editMenu' },
{ role: 'viewMenu' },
{
label: 'View',
submenu: [
// ⌘R refreshes git status + the file explorer instead of reloading the
// window. We send the same "project changed" ping the disk watchers use,
// which makes the renderer re-read git + the file tree. Reload / Force
// Reload are intentionally omitted so ⌘R never blows away app state.
{
label: 'Refresh',
accelerator: 'CmdOrCtrl+R',
click: (_m, win) => {
const bw = win instanceof BrowserWindow ? win : BrowserWindow.getFocusedWindow()
bw?.webContents.send('project:changed')
},
},
{ type: 'separator' },
{ role: 'toggleDevTools' },
{ type: 'separator' },
{ role: 'resetZoom' },
{ role: 'zoomIn' },
{ role: 'zoomOut' },
{ type: 'separator' },
{ role: 'togglefullscreen' },
],
},
{ role: 'windowMenu' },
]
return Menu.buildFromTemplate(template)