mirror of
https://github.com/Readarr/Readarr.git
synced 2026-03-28 18:05:51 -04:00
New: Show warning for queue when there is a warning
This commit is contained in:
@@ -22,14 +22,23 @@ define(
|
||||
|
||||
var count = QueueCollection.fullCollection.length;
|
||||
var label = 'label-info';
|
||||
|
||||
var errors = QueueCollection.fullCollection.some(function (model) {
|
||||
return model.has('errorMessage');
|
||||
return model.get('trackedDownloadStatus').toLowerCase() === 'error';
|
||||
});
|
||||
|
||||
var warnings = QueueCollection.fullCollection.some(function (model) {
|
||||
return model.get('trackedDownloadStatus').toLowerCase() === 'warning';
|
||||
});
|
||||
|
||||
if (errors) {
|
||||
label = 'label-danger';
|
||||
}
|
||||
|
||||
else if (warnings) {
|
||||
label = 'label-warning';
|
||||
}
|
||||
|
||||
this.$el.html('<span class="label {0}">{1}</span>'.format(label, count));
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user