Merge pull request #926 from manland/MM-13827
add a menu to open dev tools for current webview
This commit is contained in:
@@ -112,6 +112,10 @@ export default class MainPage extends React.Component {
|
|||||||
focusListener();
|
focusListener();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcRenderer.on('open-devtool', () => {
|
||||||
|
document.getElementById(`mattermostView${self.state.key}`).openDevTools();
|
||||||
|
});
|
||||||
|
|
||||||
//goBack and goForward
|
//goBack and goForward
|
||||||
ipcRenderer.on('go-back', () => {
|
ipcRenderer.on('go-back', () => {
|
||||||
const mattermost = self.refs[`mattermostView${self.state.key}`];
|
const mattermost = self.refs[`mattermostView${self.state.key}`];
|
||||||
|
@@ -145,7 +145,7 @@ function createTemplate(mainWindow, config, isDev) {
|
|||||||
visible: false,
|
visible: false,
|
||||||
role: 'zoomout',
|
role: 'zoomout',
|
||||||
}, separatorItem, {
|
}, separatorItem, {
|
||||||
label: 'Toggle Developer Tools',
|
label: 'Developer Tools for Application Wrapper',
|
||||||
accelerator: (() => {
|
accelerator: (() => {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
return 'Alt+Command+I';
|
return 'Alt+Command+I';
|
||||||
@@ -157,6 +157,11 @@ function createTemplate(mainWindow, config, isDev) {
|
|||||||
focusedWindow.toggleDevTools();
|
focusedWindow.toggleDevTools();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
label: 'Developer Tools for Current Server',
|
||||||
|
click() {
|
||||||
|
mainWindow.webContents.send('open-devtool');
|
||||||
|
},
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
template.push({
|
template.push({
|
||||||
|
Reference in New Issue
Block a user