Skip to content

Commit

Permalink
Display version information in a dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio-walser committed Nov 27, 2024
1 parent e5c7c43 commit 6fe9065
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 6fe9065

Please sign in to comment.