Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ To run the **electron app**:
pnpm start
```

To reload the app with the changes that `pnpm watch` has detected, you can use the `CmdOrCtrl+R` shortcut.

### Tests

There are 2 checks:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:check": "biome check",
"lint": "biome check --fix",
"test": "jest",
"start": "electron . --enable-logging",
"start": "NODE_ENV='development' && electron . --enable-logging",
"prepare": "husky"
},
"engines": {
Expand Down
13 changes: 5 additions & 8 deletions src/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,13 @@ app.whenReady().then(async () => {

// DevTools configuration
mb.window.webContents.on('devtools-opened', () => {
mb.window.setSize(800, 600);
mb.window.center();
mb.window.resizable = true;
if (process.env.NODE_ENV === 'development')
mb.window.setAlwaysOnTop(true);
});

mb.window.webContents.on('devtools-closed', () => {
const trayBounds = mb.tray.getBounds();
mb.window.setSize(browserWindowOpts.width, browserWindowOpts.height);
mb.positioner.move('trayCenter', trayBounds);
mb.window.resizable = false;
mb.window.on('ready-to-show', () => {
if (process.env.NODE_ENV === 'development')
mb.window.webContents.openDevTools();
});
});

Expand Down