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:
@@ -1847,6 +1847,19 @@ async function appMain() {
|
|||||||
}
|
}
|
||||||
}, 2000); // 2 second delay after window is shown
|
}, 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
|
// Get the existing menu
|
||||||
const menu = Menu.getApplicationMenu();
|
const menu = Menu.getApplicationMenu();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user