Refactor download queue

This commit is contained in:
Geomitron
2020-05-10 12:18:25 -04:00
parent 6f8f69c087
commit 1cfb5f4e93
15 changed files with 678 additions and 490 deletions

View File

@@ -12,13 +12,6 @@
<i class="redo icon"></i>
Retry
</button>
<button
*ngIf="download.type == 'warning'"
class="ui right floated labeled icon button"
(click)="continueDownload(download.versionID)">
<i class="exclamation triangle icon"></i>
Download Anyway
</button>
<div class="header">{{download.header}}</div>
<div *ngIf="download.type != 'done'" class="description">{{download.description}}</div>
<div *ngIf="download.type == 'done'" class="description">

View File

@@ -38,11 +38,6 @@ export class DownloadsModalComponent {
this.downloadService.retryDownload(versionID)
}
continueDownload(versionID: number) {
// TODO: test this
this.downloadService.continueDownload(versionID)
}
getBackgroundColor(download: DownloadProgress) {
switch (download.type) {
case 'good': return 'unset'

View File

@@ -67,8 +67,4 @@ export class DownloadService {
retryDownload(versionID: number) {
this.electronService.sendIPC('download', { action: 'retry', versionID })
}
continueDownload(versionID: number) {
this.electronService.sendIPC('download', { action: 'continue', versionID })
}
}