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

@@ -8,6 +8,7 @@ import { DownloadHandler } from '../ipc/download/DownloadHandler'
import { Settings } from './Settings'
import InitSettingsHandler from '../ipc/InitSettingsHandler.ipc'
import BatchSongDetailsHandler from '../ipc/BatchSongDetailsHandler.ipc'
import OpenFolderHandler from '../ipc/OpenFolderHandler.ipc'
/**
* To add a new IPC listener:
@@ -57,13 +58,15 @@ export interface IPCInvokeHandler<E extends keyof IPCInvokeEvents> {
export function getIPCEmitHandlers(): IPCEmitHandler<keyof IPCEmitEvents>[]{
return [
new DownloadHandler()
new DownloadHandler(),
new OpenFolderHandler()
]
}
export type IPCEmitEvents = {
'download': Download
'download-updated': DownloadProgress
'open-folder': string
}
export interface IPCEmitHandler<E extends keyof IPCEmitEvents> {

View File

@@ -23,5 +23,5 @@ export interface DownloadProgress {
header: string
description: string
percent: number
type: 'good' | 'warning' | 'error' | 'cancel'
type: 'good' | 'warning' | 'error' | 'cancel' | 'done'
}