mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
(cherry picked from commit 811eb36c7b1a5124270ff93d18d16944e654de81) Co-authored-by: Mark McDowall <mark@mcdowall.ca> Closes #10764 Closes #10776 Closes #10781
31 lines
481 B
TypeScript
31 lines
481 B
TypeScript
function getStatusStyle(
|
|
hasFile: boolean,
|
|
downloading: boolean,
|
|
isMonitored: boolean,
|
|
isAvailable: boolean
|
|
) {
|
|
if (downloading) {
|
|
return 'queue';
|
|
}
|
|
|
|
if (hasFile && isMonitored) {
|
|
return 'downloaded';
|
|
}
|
|
|
|
if (hasFile && !isMonitored) {
|
|
return 'unmonitored';
|
|
}
|
|
|
|
if (isAvailable && isMonitored) {
|
|
return 'missingMonitored';
|
|
}
|
|
|
|
if (!isMonitored) {
|
|
return 'missingUnmonitored';
|
|
}
|
|
|
|
return 'continuing';
|
|
}
|
|
|
|
export default getStatusStyle;
|