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