mirror of
https://github.com/pierre42100/ComunicDesktop
synced 2024-10-22 22:03:25 +00:00
43 lines
578 B
JavaScript
43 lines
578 B
JavaScript
|
/**
|
||
|
* Application menu
|
||
|
*
|
||
|
* @author Comunic Authors
|
||
|
*/
|
||
|
|
||
|
const {app, Menu} = require('electron');
|
||
|
|
||
|
/**
|
||
|
* Get application menu
|
||
|
*
|
||
|
* @param {BrowserWindow} window
|
||
|
* @return {Menu} Application menu
|
||
|
*/
|
||
|
module.exports.Get = function(window){
|
||
|
|
||
|
return Menu.buildFromTemplate([
|
||
|
{
|
||
|
label: "File",
|
||
|
submenu: [
|
||
|
{
|
||
|
label: "Quit",
|
||
|
click: () => {
|
||
|
app.quit();
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
|
||
|
{
|
||
|
label: "Advanced",
|
||
|
submenu: [
|
||
|
{
|
||
|
label: "Toggle developer tools",
|
||
|
click: () => {
|
||
|
window.webContents.toggleDevTools();
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
])
|
||
|
|
||
|
}
|