New: Add status color to index table for Downloaded + Monitored (#6411)
Fixed: Fix issue with calendar not showing Downloaded + Unmonitored (Yellow) Fixed: Fix issue with colorblind mode not working anywhere except the Calendar Refactor status color function so it is used everywhere instead of one for the calendar and one everywhere else Refactor css style naming to be more consistent in the calendar with everything elsepull/6689/head
parent
4bf311d820
commit
750b0331ab
@ -1,23 +0,0 @@
|
||||
|
||||
function getStatusStyle(hasFile, downloading, isAvailable, isMonitored) {
|
||||
|
||||
if (hasFile) {
|
||||
return 'downloaded';
|
||||
}
|
||||
|
||||
if (downloading) {
|
||||
return 'downloading';
|
||||
}
|
||||
|
||||
if (!isMonitored) {
|
||||
return 'unmonitored';
|
||||
}
|
||||
|
||||
if (isAvailable && !hasFile) {
|
||||
return 'missing';
|
||||
}
|
||||
|
||||
return 'unreleased';
|
||||
}
|
||||
|
||||
export default getStatusStyle;
|
@ -1,27 +0,0 @@
|
||||
import { kinds } from 'Helpers/Props';
|
||||
|
||||
function getProgressBarKind(status, monitored, hasFile, isAvailable, queue = false) {
|
||||
if (queue) {
|
||||
return kinds.QUEUE;
|
||||
}
|
||||
|
||||
if (hasFile && monitored) {
|
||||
return kinds.SUCCESS;
|
||||
}
|
||||
|
||||
if (hasFile && !monitored) {
|
||||
return kinds.DEFAULT;
|
||||
}
|
||||
|
||||
if (isAvailable && monitored) {
|
||||
return kinds.DANGER;
|
||||
}
|
||||
|
||||
if (!monitored) {
|
||||
return kinds.WARNING;
|
||||
}
|
||||
|
||||
return kinds.PRIMARY;
|
||||
}
|
||||
|
||||
export default getProgressBarKind;
|
@ -0,0 +1,27 @@
|
||||
import { kinds } from 'Helpers/Props';
|
||||
|
||||
function getStatusStyle(status, monitored, hasFile, isAvailable, returnType, queue = false) {
|
||||
if (queue) {
|
||||
return returnType === 'kinds' ? kinds.SUCCESS : 'queue';
|
||||
}
|
||||
|
||||
if (hasFile && monitored) {
|
||||
return returnType === 'kinds' ? kinds.SUCCESS : 'downloaded';
|
||||
}
|
||||
|
||||
if (hasFile && !monitored) {
|
||||
return returnType === 'kinds' ? kinds.DEFAULT : 'unreleased';
|
||||
}
|
||||
|
||||
if (isAvailable && monitored) {
|
||||
return returnType === 'kinds' ? kinds.DANGER : 'missingMonitored';
|
||||
}
|
||||
|
||||
if (!monitored) {
|
||||
return returnType === 'kinds' ? kinds.WARNING : 'missingUnmonitored';
|
||||
}
|
||||
|
||||
return returnType === 'kinds' ? kinds.PRIMARY : 'continuing';
|
||||
}
|
||||
|
||||
export default getStatusStyle;
|
Loading…
Reference in new issue