Skip to content

Commit

Permalink
Display version information in a dialog (#23)
Browse files Browse the repository at this point in the history
* Display version information in a dialog

* lowercase in favor of menu label consitency
  • Loading branch information
claudio-walser authored Nov 28, 2024
1 parent e5c7c43 commit a7ba062
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ function createWindow() {
isAlwaysOnTopChecked = Settings.Instance.AlwaysOnTop;
},
},
{
label: 'Show version',
accelerator: 'CmdOrCtrl+I',
click(menuItem, browserWindow) {
const packageInfo = require('../package.json');
dialog
.showMessageBox({
message: `Bort version: ${ packageInfo.version }`
})
// should always handle the error yourself, later Electron release might crash if you don't
.catch(function (err) {
console.error(err);
});
},
},
{
label: 'Exit',
click() {
Expand Down

0 comments on commit a7ba062

Please sign in to comment.