Skip to content

Commit

Permalink
add dock click show feature
Browse files Browse the repository at this point in the history
  • Loading branch information
TrumanDu committed Nov 29, 2024
1 parent f82ac9a commit 65958fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,13 @@ app
app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) createWindow();
if (mainWindow === null) {
createWindow();
} else if (dashboardWindow?.isVisible()) {
dashboardWindow.hide();
} else {
dashboardWindow?.show();
}
});
})
.catch(console.log);
Expand Down

0 comments on commit 65958fe

Please sign in to comment.