From 7f1497974febf4e0469ecfdb2d31da255961650e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 24 May 2020 13:30:33 -0700 Subject: [PATCH] Queue status/timeleft improvements New: Queue status icon is purple when download is waiting to import or importing Fixed: Timeleft on Queue won't show when completed Closes #3743 --- frontend/src/Activity/Queue/QueueStatusCell.js | 11 +++++++---- frontend/src/Activity/Queue/TimeleftCell.js | 6 +++--- frontend/src/Components/Icon.css | 4 ++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/frontend/src/Activity/Queue/QueueStatusCell.js b/frontend/src/Activity/Queue/QueueStatusCell.js index 7ce0b6300..d86d1e4ad 100644 --- a/frontend/src/Activity/Queue/QueueStatusCell.js +++ b/frontend/src/Activity/Queue/QueueStatusCell.js @@ -51,10 +51,6 @@ function QueueStatusCell(props) { let iconKind = kinds.DEFAULT; let title = 'Downloading'; - if (hasWarning) { - iconKind = kinds.WARNING; - } - if (status === 'paused') { iconName = icons.PAUSED; title = 'Paused'; @@ -71,17 +67,24 @@ function QueueStatusCell(props) { if (trackedDownloadState === 'importPending') { title += ' - Waiting to Import'; + iconKind = kinds.PURPLE; } if (trackedDownloadState === 'importing') { title += ' - Importing'; + iconKind = kinds.PURPLE; } if (trackedDownloadState === 'failedPending') { title += ' - Waiting to Process'; + iconKind = kinds.DANGER; } } + if (hasWarning) { + iconKind = kinds.WARNING; + } + if (status === 'delay') { iconName = icons.PENDING; title = 'Pending'; diff --git a/frontend/src/Activity/Queue/TimeleftCell.js b/frontend/src/Activity/Queue/TimeleftCell.js index c9515f172..f4356224b 100644 --- a/frontend/src/Activity/Queue/TimeleftCell.js +++ b/frontend/src/Activity/Queue/TimeleftCell.js @@ -19,7 +19,7 @@ function TimeleftCell(props) { timeFormat } = props; - if (status === 'Delay') { + if (status === 'delay') { const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates); const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true }); @@ -33,7 +33,7 @@ function TimeleftCell(props) { ); } - if (status === 'DownloadClientUnavailable') { + if (status === 'downloadClientUnavailable') { const date = getRelativeDate(estimatedCompletionTime, shortDateFormat, showRelativeDates); const time = formatTime(estimatedCompletionTime, timeFormat, { includeMinuteZero: true }); @@ -47,7 +47,7 @@ function TimeleftCell(props) { ); } - if (!timeleft) { + if (!timeleft || status === 'completed' || status === 'failed') { return ( - diff --git a/frontend/src/Components/Icon.css b/frontend/src/Components/Icon.css index df1ff5327..db95e019b 100644 --- a/frontend/src/Components/Icon.css +++ b/frontend/src/Components/Icon.css @@ -25,3 +25,7 @@ .warning { color: $warningColor; } + +.purple { + color: $purple; +}