[Desktop] Move mode switch from View menu to a new Options menu

This commit is contained in:
Bruno Lemos
2018-12-28 03:14:23 -02:00
parent ab3cc388ad
commit 7c28376bbc

View File

@@ -270,6 +270,17 @@ function getMainMenuItems() {
const isCurrentWindow = mainWindow.isVisible() && !mainWindow.isMinimized()
const menuItems: Electron.MenuItemConstructorOptions[] = [
{
label: 'Options',
submenu: [
...getModeMenuItems(),
{
type: 'separator',
enabled: isCurrentWindow,
},
...getOptionsMenuItems(),
],
},
{
label: 'Edit',
submenu: [
@@ -330,16 +341,6 @@ function getMainMenuItems() {
if (focusedWindow) focusedWindow.webContents.toggleDevTools()
},
},
{
type: 'separator',
enabled: isCurrentWindow,
},
...getModeMenuItems(),
{
type: 'separator',
enabled: isCurrentWindow,
},
...getOptionsMenuItems(),
],
},
{