antares/src/renderer/ipc-api/Application.ts

13 lines
442 B
TypeScript
Raw Normal View History

2022-06-05 17:57:44 +02:00
import { ipcRenderer, OpenDialogOptions, OpenDialogReturnValue } from 'electron';
import { unproxify } from '../libs/unproxify';
export default class {
static showOpenDialog (options: OpenDialogOptions): Promise<OpenDialogReturnValue> {
return ipcRenderer.invoke('show-open-dialog', unproxify(options));
}
static getDownloadPathDirectory (): Promise<string> {
return ipcRenderer.invoke('get-download-dir-path');
}
}