lbry-desktop/ui/native.js

20 lines
405 B
JavaScript
Raw Normal View History

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