mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Renames in Frontend
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
|
||||
function getNewAuthor(author, payload) {
|
||||
const {
|
||||
rootFolderPath,
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
metadataProfileId,
|
||||
authorType,
|
||||
tags,
|
||||
searchForMissingBooks = false
|
||||
} = payload;
|
||||
|
||||
const addOptions = {
|
||||
monitor,
|
||||
searchForMissingBooks
|
||||
};
|
||||
|
||||
author.addOptions = addOptions;
|
||||
author.monitored = true;
|
||||
author.qualityProfileId = qualityProfileId;
|
||||
author.metadataProfileId = metadataProfileId;
|
||||
author.rootFolderPath = rootFolderPath;
|
||||
author.authorType = authorType;
|
||||
author.tags = tags;
|
||||
|
||||
return author;
|
||||
}
|
||||
|
||||
export default getNewAuthor;
|
||||
@@ -0,0 +1,15 @@
|
||||
import { kinds } from 'Helpers/Props';
|
||||
|
||||
function getProgressBarKind(status, monitored, progress) {
|
||||
if (progress === 100) {
|
||||
return status === 'ended' ? kinds.SUCCESS : kinds.PRIMARY;
|
||||
}
|
||||
|
||||
if (monitored) {
|
||||
return kinds.DANGER;
|
||||
}
|
||||
|
||||
return kinds.WARNING;
|
||||
}
|
||||
|
||||
export default getProgressBarKind;
|
||||
@@ -0,0 +1,11 @@
|
||||
const monitorOptions = [
|
||||
{ key: 'all', value: 'All Books' },
|
||||
{ key: 'future', value: 'Future Books' },
|
||||
{ key: 'missing', value: 'Missing Books' },
|
||||
{ key: 'existing', value: 'Existing Books' },
|
||||
{ key: 'first', value: 'Only First Book' },
|
||||
{ key: 'latest', value: 'Only Latest Book' },
|
||||
{ key: 'none', value: 'None' }
|
||||
];
|
||||
|
||||
export default monitorOptions;
|
||||
Reference in New Issue
Block a user