Unverified Commit 1562f13e authored by Thibaut Sardan's avatar Thibaut Sardan Committed by GitHub
Browse files

feat: only show dev tools in dev environment (#544)

parent fb0d9f88
Pipeline #50610 passed with stages
in 10 minutes and 30 seconds
......@@ -152,15 +152,16 @@ const getMenubarMenuTemplate = fetherApp => {
const viewTab = {
label: i18n.t('menu.view.submenu_name'),
submenu: [
{ role: 'reload', label: i18n.t('menu.view.reload') },
{
role: 'toggledevtools',
label: i18n.t('menu.view.toggle_developer_tools')
}
]
submenu: [{ role: 'reload', label: i18n.t('menu.view.reload') }]
};
if (!IS_PROD) {
viewTab.submenu.push({
role: 'toggledevtools',
label: i18n.t('menu.view.toggle_developer_tools')
});
}
/**
* On win32 we need to use `webContents` to make some of the menu items
* functional (whereas it is not required on Linux and macOS).
......
......@@ -142,7 +142,7 @@ const SECURITY_OPTIONS = {
* Potential security risk options set explicitly even when default is favourable.
* Reference: https://electronjs.org/docs/tutorial/security
*/
devTools: true,
devTools: !IS_PROD,
/**
* `nodeIntegration` when enabled allows the software to use Electron's APIs
* and gain access to Node.js. It must be disabled to restricting access to
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment