mirror of
https://github.com/pierre42100/ComunicDesktop
synced 2024-11-23 12:39:22 +00:00
Can enable dark mode
This commit is contained in:
parent
33b8e4e2b6
commit
e01f521192
@ -15,27 +15,53 @@ const {app, Menu} = require('electron');
|
||||
module.exports.Get = function(window){
|
||||
|
||||
return Menu.buildFromTemplate([
|
||||
|
||||
//File menu
|
||||
{
|
||||
label: "File",
|
||||
submenu: [
|
||||
|
||||
//Close app
|
||||
{
|
||||
label: "Quit",
|
||||
click: () => {
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
//Settings menu
|
||||
{
|
||||
label: "Settings",
|
||||
submenu: [
|
||||
|
||||
//Dark mode
|
||||
{
|
||||
label: "Toggle dark mode",
|
||||
click: () => {
|
||||
window.webContents.executeJavaScript("ComunicWeb.components.darkTheme.setEnabled(!ComunicWeb.components.darkTheme.isEnabled());");
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
//Advanced menu
|
||||
{
|
||||
label: "Advanced",
|
||||
submenu: [
|
||||
|
||||
//Dev tools
|
||||
{
|
||||
label: "Toggle developer tools",
|
||||
click: () => {
|
||||
window.webContents.toggleDevTools();
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user