New: Queue status icon is purple when download is waiting to import or importing

Fixed: Time Left on Queue won't show when completed
Queue status/timeleft improvements

Closes #281

(cherry picked from commit 910de6d94a4482e82e295153e01c299460af2d2d)
pull/1112/head
Mark McDowall 5 years ago committed by Qstick
parent 1be94da583
commit d34e588588

@ -52,10 +52,6 @@ function QueueStatusCell(props) {
let iconKind = kinds.DEFAULT; let iconKind = kinds.DEFAULT;
let title = translate('Title'); let title = translate('Title');
if (hasWarning) {
iconKind = kinds.WARNING;
}
if (status === 'paused') { if (status === 'paused') {
iconName = icons.PAUSED; iconName = icons.PAUSED;
title = 'Paused'; title = 'Paused';
@ -72,17 +68,24 @@ function QueueStatusCell(props) {
if (trackedDownloadState === 'importPending') { if (trackedDownloadState === 'importPending') {
title += ' - Waiting to Import'; title += ' - Waiting to Import';
iconKind = kinds.PURPLE;
} }
if (trackedDownloadState === 'importing') { if (trackedDownloadState === 'importing') {
title += ' - Importing'; title += ' - Importing';
iconKind = kinds.PURPLE;
} }
if (trackedDownloadState === 'failedPending') { if (trackedDownloadState === 'failedPending') {
title += ' - Waiting to Process'; title += ' - Waiting to Process';
iconKind = kinds.DANGER;
} }
} }
if (hasWarning) {
iconKind = kinds.WARNING;
}
if (status === 'delay') { if (status === 'delay') {
iconName = icons.PENDING; iconName = icons.PENDING;
title = 'Pending'; title = 'Pending';

@ -20,7 +20,7 @@ function TimeleftCell(props) {
timeFormat timeFormat
} = props; } = props;
if (status === 'Delay') { if (status === 'delay') {
const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates); const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates);
const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true }); const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true });
@ -34,7 +34,7 @@ function TimeleftCell(props) {
); );
} }
if (status === 'DownloadClientUnavailable') { if (status === 'downloadClientUnavailable') {
const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates); const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates);
const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true }); const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true });
@ -48,7 +48,7 @@ function TimeleftCell(props) {
); );
} }
if (!timeleft) { if (!timeleft || status === 'completed' || status === 'failed') {
return ( return (
<TableRowCell className={styles.timeleft}> <TableRowCell className={styles.timeleft}>
- -

@ -25,3 +25,7 @@
.warning { .warning {
color: $warningColor; color: $warningColor;
} }
.purple {
color: $purple;
}

Loading…
Cancel
Save