Skip to content

Commit

Permalink
Add tray action to open devtools (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Oct 25, 2024
1 parent e6abb4b commit b46a0b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export const createWindow = async (userResourcesPath?: string): Promise<BrowserW
nodeIntegration: true,
contextIsolation: true,
webviewTag: true,
devTools: true,
},
autoHideMenuBar: true,
});
Expand Down
4 changes: 4 additions & 0 deletions src/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export function SetupTray(
label: 'Open Logs Folder',
click: () => shell.openPath(app.getPath('logs')),
},
{
label: 'Open devtools',
click: () => mainView.webContents.openDevTools(),
},
{
label: 'Toggle Log Viewer',
click: () => toggleLogs(),
Expand Down

0 comments on commit b46a0b6

Please sign in to comment.