File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,15 @@ contextBridge.exposeInMainWorld('mtrApi', {
3535 return ( ) => { ipcRenderer . removeListener ( 'loss:data' , listener as ( ...args : unknown [ ] ) => void ) ; } ;
3636 } ,
3737
38- // Auto-updater
38+ // App info
3939 getVersion : ( ) => ipcRenderer . invoke ( 'app:version' ) ,
40+ getProcessVersions : ( ) => ( {
41+ electron : process . versions . electron ,
42+ chrome : process . versions . chrome ,
43+ node : process . versions . node ,
44+ } ) ,
45+
46+ // Auto-updater
4047 checkForUpdates : ( ) => ipcRenderer . invoke ( 'updater:check' ) ,
4148 downloadUpdate : ( ) => ipcRenderer . invoke ( 'updater:download' ) ,
4249 installUpdate : ( ) => ipcRenderer . invoke ( 'updater:install' ) ,
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ export default function AboutView() {
88 const [ updateStatus , setUpdateStatus ] = useState < UpdateStatus > ( 'idle' ) ;
99 const [ downloadPercent , setDownloadPercent ] = useState ( 0 ) ;
1010
11+ const processVersions = window . mtrApi . getProcessVersions ( ) ;
12+
1113 useEffect ( ( ) => {
1214 window . mtrApi . getVersion ( ) . then ( setVersion ) ;
1315
@@ -131,9 +133,9 @@ export default function AboutView() {
131133 < div className = "flex flex-col gap-2" >
132134 < InfoRow label = "Author" value = "Dave" />
133135 < InfoRow label = "License" value = "MIT" />
134- < InfoRow label = "Electron" value = { process . versions . electron || 'N/A' } />
135- < InfoRow label = "Chrome" value = { process . versions . chrome || 'N/A' } />
136- < InfoRow label = "Node" value = { process . versions . node || 'N/A' } />
136+ < InfoRow label = "Electron" value = { processVersions . electron } />
137+ < InfoRow label = "Chrome" value = { processVersions . chrome } />
138+ < InfoRow label = "Node" value = { processVersions . node } />
137139 </ div >
138140 </ div >
139141 </ motion . div >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface MtrApi {
1111 stopLossMonitor : ( ) => Promise < void > ;
1212 onLossData : ( callback : ( state : LossMonitorState ) => void ) => ( ) => void ;
1313 getVersion : ( ) => Promise < string > ;
14+ getProcessVersions : ( ) => { electron : string ; chrome : string ; node : string } ;
1415 checkForUpdates : ( ) => Promise < void > ;
1516 downloadUpdate : ( ) => Promise < void > ;
1617 installUpdate : ( ) => Promise < void > ;
You can’t perform that action at this time.
0 commit comments