16 lines
373 B
JavaScript
16 lines
373 B
JavaScript
|
import { ipcRenderer } from 'electron';
|
||
|
|
||
|
const Native = {};
|
||
|
|
||
|
Native.getAppVersionInfo = () =>
|
||
|
new Promise(resolve => {
|
||
|
ipcRenderer.once('version-info-received', (event, versionInfo) => {
|
||
|
resolve(versionInfo);
|
||
|
});
|
||
|
ipcRenderer.send('version-info-requested');
|
||
|
});
|
||
|
|
||
|
Native.imagePath = file => `${staticResourcesPath}/img/${file}`;
|
||
|
|
||
|
export default Native;
|