diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2024-05-06 14:56:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 19:26:26 +0530 |
commit | fd8885b869808936ab58c492e9ce602bfe3c3713 (patch) | |
tree | f71737871033539fa54f5504f4c6234829e8cd28 /src/electron | |
parent | Refactor context menu to be more consistent across all contexts (#1745) (diff) | |
download | ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.tar.gz ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.tar.zst ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.zip |
feat: default download path as a user preference (#1746)
Diffstat (limited to 'src/electron')
-rw-r--r-- | src/electron/ipc-api/download.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/electron/ipc-api/download.ts b/src/electron/ipc-api/download.ts index d749cb889..a306ba68d 100644 --- a/src/electron/ipc-api/download.ts +++ b/src/electron/ipc-api/download.ts | |||
@@ -52,4 +52,14 @@ export default (params: { mainWindow: BrowserWindow }) => { | |||
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | ); | 54 | ); |
55 | |||
56 | ipcMain.handle('download-folder-select', async () => { | ||
57 | const result = await dialog.showOpenDialog(params.mainWindow, { | ||
58 | properties: ['openDirectory'], | ||
59 | }); | ||
60 | |||
61 | if (result.canceled) return null; | ||
62 | |||
63 | return result.filePaths[0]; | ||
64 | }); | ||
55 | }; | 65 | }; |