File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff 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
233249const startFlaskServer = ( ) => {
You can’t perform that action at this time.
0 commit comments