2019-03-04 23:46:57 -05:00
|
|
|
// @if TARGET='app'
|
|
|
|
import { ipcRenderer } from 'electron';
|
2020-12-08 16:50:10 -05:00
|
|
|
// @endif
|
|
|
|
|
|
|
|
const Native = {};
|
2019-03-04 23:46:57 -05:00
|
|
|
|
2020-12-08 16:50:10 -05:00
|
|
|
// @if TARGET='app'
|
2018-04-18 00:03:01 -04:00
|
|
|
Native.getAppVersionInfo = () =>
|
|
|
|
new Promise(resolve => {
|
2019-02-22 00:01:59 -05:00
|
|
|
// @if TARGET='app'
|
2018-04-18 00:03:01 -04:00
|
|
|
ipcRenderer.once('version-info-received', (event, versionInfo) => {
|
|
|
|
resolve(versionInfo);
|
|
|
|
});
|
|
|
|
ipcRenderer.send('version-info-requested');
|
2019-02-22 00:01:59 -05:00
|
|
|
// @endif
|
2018-04-18 00:03:01 -04:00
|
|
|
});
|
2019-03-04 23:46:57 -05:00
|
|
|
// @endif
|
2018-04-18 00:03:01 -04:00
|
|
|
|
|
|
|
export default Native;
|