Add Go to URL dialog menu (#131)

This commit is contained in:
Quang Lam 2020-02-11 04:27:06 -06:00 committed by GitHub
parent 06c9a4db24
commit 3e9ff738a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 247 additions and 8 deletions

View file

@ -11,6 +11,7 @@ const codeInjectionWindow = require('../windows/code-injection');
const customUserAgentWindow = require('../windows/custom-user-agent');
const displayMediaWindow = require('../windows/display-media');
const editWorkspaceWindow = require('../windows/edit-workspace');
const goToUrlWindow = require('../windows/go-to-url');
const licenseRegistrationWindow = require('../windows/license-registration');
const mainWindow = require('../windows/main');
const notificationsWindow = require('../windows/notifications');
@ -299,6 +300,19 @@ function createMenu() {
}
},
},
{
label: 'Go To URL Window',
click: () => {
const win = goToUrlWindow.get();
if (win != null) {
if (win.webContents.isDevToolsOpened()) {
win.webContents.closeDevTools();
} else {
win.webContents.openDevTools({ mode: 'detach' });
}
}
},
},
{ type: 'separator' },
],
},
@ -339,6 +353,15 @@ function createMenu() {
},
enabled: hasWorkspaces,
},
{ type: 'separator' },
{
label: 'Go to URL...',
accelerator: 'CmdOrCtrl+Shift+G',
click: () => {
goToUrlWindow.show();
},
enabled: hasWorkspaces,
},
],
},
{