Skip to content
Merged
Changes from 4 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
18 changes: 17 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,24 @@ const template = [
await shell.openExternal('https://rapidpowerestimator.readthedocs.io/en/latest/');
},
},
{
label: 'About',
click: () => {
// dynamically reading package.json
const packagePath = path.join(__dirname, 'package.json');
const packageData = JSON.parse(fs.readFileSync(packagePath, 'utf8'));

const message = `${packageData.build.productName}\nVersion: ${packageData.version}\nAuthor: ${packageData.author}\nCopyright: ${packageData.build.copyright}\nType: Engineering`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type is still hardcoded here, please remove it.
Also confirm that production build has same data.


dialog.showMessageBox(mainWindow, {
type: 'info',
title: packageData.build.productName,
message: message,
});
},
},
],
},
},
];

const startFlaskServer = () => {
Expand Down
Loading