2021-10-29 12:58:37 +02:00
|
|
|
import { app, ipcMain, dialog } from 'electron';
|
2020-07-29 15:56:29 +02:00
|
|
|
|
|
|
|
export default () => {
|
2020-08-18 18:03:59 +02:00
|
|
|
ipcMain.on('close-app', () => {
|
2020-07-29 15:56:29 +02:00
|
|
|
app.exit();
|
|
|
|
});
|
2020-12-18 18:44:32 +01:00
|
|
|
|
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
|
|
|
};
|