mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 22:29:38 +00:00
Clickable folder link after download
This commit is contained in:
10
src/electron/ipc/OpenFolderHandler.ipc.ts
Normal file
10
src/electron/ipc/OpenFolderHandler.ipc.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { IPCEmitHandler } from '../shared/IPCHandler'
|
||||
import { shell } from 'electron'
|
||||
|
||||
export default class OpenFolderHandler implements IPCEmitHandler<'open-folder'> {
|
||||
event: 'open-folder' = 'open-folder'
|
||||
|
||||
async handler(filepath: string) {
|
||||
shell.showItemInFolder(filepath)
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ export class DownloadHandler implements IPCEmitHandler<'download'> {
|
||||
download.header = `Download complete.`
|
||||
download.description = filepath
|
||||
download.percent = 100
|
||||
download.type = 'good'
|
||||
download.type = 'done'
|
||||
emitIPCEvent('download-updated', download)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user