Commit b87e73b3 authored by mercury233's avatar mercury233

openDevTools in undocked mode

parent 231a79bf
...@@ -63,7 +63,7 @@ export class MyCardComponent implements OnInit { ...@@ -63,7 +63,7 @@ export class MyCardComponent implements OnInit {
&& konami_code_logger[1].toLowerCase() == 'b' && konami_code_logger[1].toLowerCase() == 'b'
&& konami_code_logger[0].toLowerCase() == 'a' && konami_code_logger[0].toLowerCase() == 'a'
) { ) {
this.currentWindow.webContents.openDevTools(); this.currentWindow.webContents.openDevTools({ mode: 'undocked' });
} }
}); });
// document.addEventListener('drop', (event)=>{ // document.addEventListener('drop', (event)=>{
......
...@@ -176,7 +176,7 @@ function createWindow() { ...@@ -176,7 +176,7 @@ function createWindow() {
// Open the DevTools. // Open the DevTools.
if (process.env['NODE_ENV'] === 'development') { if (process.env['NODE_ENV'] === 'development') {
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools({ mode: 'undocked', activate: false });
} }
// Emitted when the window is closed. // Emitted when the window is closed.
...@@ -194,7 +194,7 @@ function createTray() { ...@@ -194,7 +194,7 @@ function createTray() {
tray.on('click', (event) => { tray.on('click', (event) => {
console.log(event); console.log(event);
if (event.metaKey) { if (event.metaKey) {
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools({ mode: 'undocked' });
} else { } else {
mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show(); mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show();
} }
......
Markdown is supported
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