mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
750b0331ab
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 else
28 lines
725 B
JavaScript
28 lines
725 B
JavaScript
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;
|