Skip to content

Commit

Permalink
feat: enable dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
KatoakDR committed Oct 20, 2023
1 parent c507bf6 commit d70cd0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions electron/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ serve({ directory: appRendererPath });

const createWindow = async (): Promise<void> => {
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
width: 1200,
height: 800,
webPreferences: {
preload: path.join(appPreloadPath, 'index.js'),
devTools: !app.isPackaged,
/**
* Security Best Practices
* https://www.electronjs.org/docs/latest/tutorial/security
Expand Down
8 changes: 8 additions & 0 deletions electron/main/menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ function buildDarwinTemplate(
window.setFullScreen(!window.isFullScreen());
},
},
{
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
visible: !app.isPackaged,
click: () => {
window.webContents.toggleDevTools();
},
},
{ type: 'separator' },
{
label: 'Reset Zoom',
Expand Down

0 comments on commit d70cd0a

Please sign in to comment.