bugfix: items in download bar waiting for others downloads to finish could not be removed, this corrects #68

This commit is contained in:
Roberto Tonino 2020-10-07 20:42:53 +02:00
parent d3e1b71faf
commit 8abec22794
2 changed files with 16 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -159,11 +159,14 @@ export default {
finishedWithFails() {
return this.queueItem.status === 'download finished' && this.hasFails
},
isDeterminateStatus() {
return possibleStates.indexOf(this.queueItem.status) !== -1
},
barClass() {
return {
converting: this.queueItem.status === 'converting',
indeterminate: possibleStates.indexOf(this.queueItem.status) === -1,
determinate: possibleStates.indexOf(this.queueItem.status) !== -1
indeterminate: !this.isDeterminateStatus,
determinate: this.isDeterminateStatus
}
},
barStyle() {
@ -220,6 +223,7 @@ export default {
},
methods: {
onResultIconClick() {
if (this.isDeterminateStatus) {
if (this.finishedWithFails) {
this.$emit('show-errors', this.queueItem)
}
@ -228,6 +232,10 @@ export default {
this.isLoading = true
this.$emit('remove-item', this.queueItem.uuid)
}
} else {
this.isLoading = true
this.$emit('remove-item', this.queueItem.uuid)
}
}
}
}