antares/src/main/ipc-handlers/application.ts

16 lines
347 B
TypeScript
Raw Normal View History

2021-10-29 12:58:37 +02:00
import { app, ipcMain, dialog } from 'electron';
2020-07-29 15:56:29 +02:00
export default () => {
ipcMain.on('close-app', () => {
2020-07-29 15:56:29 +02:00
app.exit();
});
2022-04-22 12:16:02 +02:00
ipcMain.handle('show-open-dialog', (event, options) => {
2021-10-29 12:58:37 +02:00
return dialog.showOpenDialog(options);
});
ipcMain.handle('get-download-dir-path', () => {
return app.getPath('downloads');
});
2020-07-29 15:56:29 +02:00
};