Skip to content

Commit 925663d

Browse files
authored
Merge branch 'main' into fix_packaging_in_linux
2 parents 7dd852f + fb4d21f commit 925663d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

main.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,24 @@ const template = [
226226
await shell.openExternal('https://rapidpowerestimator.readthedocs.io/en/latest/');
227227
},
228228
},
229+
{
230+
label: 'About',
231+
click: () => {
232+
// dynamically reading package.json
233+
const packagePath = path.join(__dirname, 'package.json');
234+
const packageData = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
235+
236+
const message = `${packageData.build.productName}\nVersion: ${packageData.version}\nAuthor: ${packageData.author}\nCopyright: ${packageData.build.copyright}`;
237+
238+
dialog.showMessageBox(mainWindow, {
239+
type: 'info',
240+
title: packageData.build.productName,
241+
message: message,
242+
});
243+
},
244+
},
229245
],
230-
},
246+
},
231247
];
232248

233249
const startFlaskServer = () => {

0 commit comments

Comments
 (0)