mirror of https://github.com/Fabio286/antares.git
21 lines
453 B
TypeScript
21 lines
453 B
TypeScript
import { app, ipcMain, dialog } from 'electron';
|
|
|
|
export default () => {
|
|
ipcMain.on('close-app', () => {
|
|
app.exit();
|
|
});
|
|
|
|
ipcMain.on('get-key', async event => {
|
|
const key = false;
|
|
event.returnValue = key;
|
|
});
|
|
|
|
ipcMain.handle('show-open-dialog', (event, options) => {
|
|
return dialog.showOpenDialog(options);
|
|
});
|
|
|
|
ipcMain.handle('get-download-dir-path', () => {
|
|
return app.getPath('downloads');
|
|
});
|
|
};
|