Clickable folder link after download

This commit is contained in:
Geomitron
2020-02-12 10:56:32 -05:00
parent 7d4d339018
commit 6c26c98468
7 changed files with 28 additions and 5 deletions

View 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)
}
}

View File

@@ -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)
})