diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2023-09-02 16:28:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-02 15:28:04 +0000 |
commit | d1c623f4c3d72c859f9ad9cb985be127d6a3eb62 (patch) | |
tree | e102da856ae328c70e822d60ac53909acd4627b9 /src/index.ts | |
parent | Downgrade 'electron' to 25.x (diff) | |
download | ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.tar.gz ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.tar.zst ferdium-app-d1c623f4c3d72c859f9ad9cb985be127d6a3eb62.zip |
feat: Add Download Manager (pause, stop, delete) (#1339)
Diffstat (limited to 'src/index.ts')
-rw-r--r-- | src/index.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts index cbc10bdbe..5accc4570 100644 --- a/src/index.ts +++ b/src/index.ts | |||
@@ -674,6 +674,16 @@ ipcMain.on('window.toolbar-double-clicked', () => { | |||
674 | } | 674 | } |
675 | }); | 675 | }); |
676 | 676 | ||
677 | ipcMain.on('stop-download', (_e, data) => { | ||
678 | debug(`stopping download from main process ${data}`); | ||
679 | mainWindow?.webContents.send('stop-download', data); | ||
680 | }); | ||
681 | |||
682 | ipcMain.on('toggle-pause-download', (_e, data) => { | ||
683 | debug(`stopping download from main process ${data}`); | ||
684 | mainWindow?.webContents.send('toggle-pause-download', data); | ||
685 | }); | ||
686 | |||
677 | // Quit when all windows are closed. | 687 | // Quit when all windows are closed. |
678 | app.on('window-all-closed', () => { | 688 | app.on('window-all-closed', () => { |
679 | // On OS X it is common for applications and their menu bar | 689 | // On OS X it is common for applications and their menu bar |