mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: editor window use correct dev tools
This commit is contained in:
parent
b202dafb84
commit
0511cc08c7
1 changed files with 3 additions and 3 deletions
|
@ -251,18 +251,18 @@ export class WindowManager {
|
|||
|
||||
editorWindow.once("ready-to-show", () => {
|
||||
editorWindow.show();
|
||||
WindowManager.mainWindow?.webContents.openDevTools();
|
||||
editorWindow.webContents.openDevTools();
|
||||
});
|
||||
|
||||
editorWindow.webContents.on("before-input-event", (event, input) => {
|
||||
if (input.key === "F12") {
|
||||
event.preventDefault();
|
||||
this.mainWindow?.webContents.toggleDevTools();
|
||||
editorWindow.webContents.toggleDevTools();
|
||||
}
|
||||
});
|
||||
|
||||
editorWindow.on("close", () => {
|
||||
WindowManager.mainWindow?.webContents.closeDevTools();
|
||||
editorWindow.webContents.closeDevTools();
|
||||
this.editorWindows.delete(themeId);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue