Overall progress bar turns red on download fail

This commit is contained in:
Geomitron
2020-07-06 21:35:09 -04:00
parent 03f061d9c7
commit f673751528
3 changed files with 7 additions and 1 deletions

View File

@@ -26,6 +26,10 @@ export class DownloadService {
return total / this.downloads.length
}
get anyErrorsExist() {
return this.downloads.find(download => download.type == 'error') ? true : false
}
addDownload(versionID: number, newDownload: NewDownload) {
if (!this.downloads.find(download => download.versionID == versionID)) { // Don't download something twice
this.electronService.receiveIPC('download-updated', result => {