feat(ui): add custom macOS dock menu with New Window option (#5099)

Co-authored-by: Alex Rouse <alex.rouse@block.xyz>
This commit is contained in:
Alex Rouse
2025-11-07 09:24:13 -05:00
committed by GitHub
parent 44c2166a38
commit 4244dc924b
+13
View File
@@ -1847,6 +1847,19 @@ async function appMain() {
}
}, 2000); // 2 second delay after window is shown
// Setup macOS dock menu
if (process.platform === 'darwin') {
const dockMenu = Menu.buildFromTemplate([
{
label: 'New Window',
click: () => {
createNewWindow(app);
},
},
]);
app.dock?.setMenu(dockMenu);
}
// Get the existing menu
const menu = Menu.getApplicationMenu();