@ -3,6 +3,8 @@ import React from 'react';
import AuthorMetadataProfilePopoverContent from 'AddAuthor/AuthorMetadataProfilePopoverContent' ;
import AuthorMonitoringOptionsPopoverContent from 'AddAuthor/AuthorMonitoringOptionsPopoverContent' ;
import AuthorMonitorNewItemsOptionsPopoverContent from 'AddAuthor/AuthorMonitorNewItemsOptionsPopoverContent' ;
import Alert from 'Components/Alert' ;
import FieldSet from 'Components/FieldSet' ;
import Form from 'Components/Form/Form' ;
import FormGroup from 'Components/Form/FormGroup' ;
import FormInputGroup from 'Components/Form/FormInputGroup' ;
@ -82,324 +84,333 @@ function EditRootFolderModalContent(props) {
{
! isFetching && ! error &&
< Form { ... otherProps } >
< FormGroup >
< FormLabel >
{ translate ( 'Name' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "name"
{ ... name }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'Path' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { id ? inputTypes . TEXT : inputTypes . PATH }
readOnly = { ! ! id }
name = "path"
helpText = { translate ( 'PathHelpText' ) }
helpTextWarning = { translate ( 'PathHelpTextWarning' ) }
{ ... path }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
Use Calibre
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreContentServer' ) }
body = { 'Using a Calibre content server allows Readarr to add books to your Calibre library and trigger conversions between formats' }
position = { tooltipPositions . RIGHT }
< FieldSet legend = { translate ( 'RootFolder' ) } >
< FormGroup >
< FormLabel >
{ translate ( 'Name' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "name"
{ ... name }
onChange = { onInputChange }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . CHECK }
isDisabled = { ! ! id }
name = "isCalibreLibrary"
helpText = { translate ( 'IsCalibreLibraryHelpText' ) }
{ ... isCalibreLibrary }
onChange = { onInputChange }
helpLink = { 'https://manual.calibre-ebook.com/server.html' }
/ >
< / F o r m G r o u p >
{
isCalibreLibrary !== undefined && isCalibreLibrary . value &&
< div >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreHost' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "host"
helpText = { translate ( 'HostHelpText' ) }
{ ... host }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibrePort' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . NUMBER }
name = "port"
helpText = { translate ( 'PortHelpText' ) }
{ ... port }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup
advancedSettings = { advancedSettings }
isAdvanced = { true }
>
< FormLabel >
{ translate ( 'CalibreUrlBase' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "urlBase"
helpText = { translate ( 'UrlBaseHelpText' ) }
{ ... urlBase }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreUsername' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "username"
helpText = { translate ( 'UsernameHelpText' ) }
{ ... username }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibrePassword' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . PASSWORD }
name = "password"
helpText = { translate ( 'PasswordHelpText' ) }
{ ... password }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreLibrary' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "library"
helpText = { translate ( 'LibraryHelpText' ) }
{ ... library }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
Convert to format
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreOutputFormat' ) }
body = { 'Specify the output format. Options are: MOBI, EPUB, AZW3, DOCX, FB2, HTMLZ, LIT, LRF, PDB, PDF, PMLZ, RB, RTF, SNB, TCR, TXT, TXTZ, ZIP' }
position = { tooltipPositions . RIGHT }
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'Path' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { id ? inputTypes . TEXT : inputTypes . PATH }
readOnly = { ! ! id }
name = "path"
helpText = { translate ( 'PathHelpText' ) }
helpTextWarning = { translate ( 'PathHelpTextWarning' ) }
{ ... path }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< / F i e l d S e t >
< FieldSet legend = { translate ( 'AddedAuthorSettings' ) } >
< FormGroup >
< FormLabel >
{ translate ( 'Monitor' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "outputFormat"
helpText = { translate ( 'OutputFormatHelpText' ) }
{ ... outputFormat }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
Calibre Output Profile
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreOutputProfile' ) }
body = { 'Specify the output profile. The output profile tells the Calibre conversion system how to optimize the created document for the specified device (such as by resizing images for the device screen size). In some cases, an output profile can be used to optimize the output for a particular device, but this is rarely necessary.' }
position = { tooltipPositions . RIGHT }
}
title = { translate ( 'MonitoringOptions' ) }
body = { < AuthorMonitoringOptionsPopoverContent / > }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . MONITOR _BOOKS _SELECT }
name = "defaultMonitorOption"
onChange = { onInputChange }
{ ... defaultMonitorOption }
helpText = { translate ( 'DefaultMonitorOptionHelpText' ) }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'MonitorNewItems' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . SELECT }
name = "outputProfile"
values = { calibreProfiles . options }
helpText = { profileHelpText }
{ ... outputProfile }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'UseSSL' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . CHECK }
name = "useSsl"
helpText = { translate ( 'UseSslHelpText' ) }
{ ... useSsl }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< / d i v >
}
< FormGroup >
< FormLabel >
{ translate ( 'Monitor' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'MonitoringOptions' ) }
body = { < AuthorMonitoringOptionsPopoverContent / > }
position = { tooltipPositions . RIGHT }
}
title = { translate ( 'MonitorNewItems' ) }
body = { < AuthorMonitorNewItemsOptionsPopoverContent / > }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . MONITOR _NEW _ITEMS _SELECT }
name = "defaultNewItemMonitorOption"
{ ... defaultNewItemMonitorOption }
onChange = { onInputChange }
helpText = { translate ( 'MonitorNewItemsHelpText' ) }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . MONITOR _BOOKS _SELECT }
name = "defaultMonitorOption"
onChange = { onInputChange }
{ ... defaultMonitorOption }
helpText = { translate ( 'DefaultMonitorOptionHelpText' ) }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'MonitorNewItems' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'MonitorNewItems' ) }
body = { < AuthorMonitorNewItemsOptionsPopoverContent / > }
position = { tooltipPositions . RIGHT }
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'QualityProfile' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . QUALITY _PROFILE _SELECT }
name = "defaultQualityProfileId"
helpText = { translate ( 'DefaultQualityProfileIdHelpText' ) }
{ ... defaultQualityProfileId }
onChange = { onInputChange }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . MONITOR _NEW _ITEMS _SELECT }
name = "defaultNewItemMonitorOption"
{ ... defaultNewItemMonitorOption }
onChange = { onInputChange }
helpText = { translate ( 'MonitorNewItemsHelpText' ) }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'QualityProfile' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . QUALITY _PROFILE _SELECT }
name = "defaultQualityProfileId"
helpText = { translate ( 'DefaultQualityProfileIdHelpText' ) }
{ ... defaultQualityProfileId }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup className = { showMetadataProfile ? undefined : styles . hideMetadataProfile } >
< FormLabel >
Metadata Profile
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'MetadataProfile' ) }
body = { < AuthorMetadataProfilePopoverContent / > }
position = { tooltipPositions . RIGHT }
< / F o r m G r o u p >
< FormGroup className = { showMetadataProfile ? undefined : styles . hideMetadataProfile } >
< FormLabel >
{ translate ( 'MetadataProfile' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'MetadataProfile' ) }
body = { < AuthorMetadataProfilePopoverContent / > }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . METADATA _PROFILE _SELECT }
name = "defaultMetadataProfileId"
helpText = { translate ( 'DefaultMetadataProfileIdHelpText' ) }
{ ... defaultMetadataProfileId }
includeNone = { true }
onChange = { onInputChange }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . METADATA _PROFILE _SELECT }
name = "defaultMetadataProfileId"
helpText = { translate ( 'DefaultMetadataProfileIdHelpText' ) }
{ ... defaultMetadataProfileId }
includeNone = { true }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'DefaultReadarrTags' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TAG }
name = "defaultTags"
helpText = { translate ( 'DefaultTagsHelpText' ) }
{ ... defaultTags }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'DefaultReadarrTags' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TAG }
name = "defaultTags"
helpText = { translate ( 'DefaultTagsHelpText' ) }
{ ... defaultTags }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< / F i e l d S e t >
< FieldSet legend = { translate ( 'CalibreSettings' ) } >
< Alert >
{ translate ( 'CalibreNotCalibreWeb' ) }
< / A l e r t >
< FormGroup >
< FormLabel >
{ translate ( 'UseCalibreContentServer' ) }
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreContentServer' ) }
body = { translate ( 'CalibreContentServerText' ) }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . CHECK }
isDisabled = { ! ! id }
name = "isCalibreLibrary"
helpText = { translate ( 'IsCalibreLibraryHelpText' ) }
{ ... isCalibreLibrary }
onChange = { onInputChange }
helpLink = { 'https://manual.calibre-ebook.com/server.html' }
/ >
< / F o r m G r o u p >
{
isCalibreLibrary !== undefined && isCalibreLibrary . value &&
< div >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreHost' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "host"
helpText = { translate ( 'HostHelpText' ) }
{ ... host }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibrePort' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . NUMBER }
name = "port"
helpText = { translate ( 'PortHelpText' ) }
{ ... port }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup
advancedSettings = { advancedSettings }
isAdvanced = { true }
>
< FormLabel >
{ translate ( 'CalibreUrlBase' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "urlBase"
helpText = { translate ( 'UrlBaseHelpText' ) }
{ ... urlBase }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreUsername' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "username"
helpText = { translate ( 'UsernameHelpText' ) }
{ ... username }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibrePassword' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . PASSWORD }
name = "password"
helpText = { translate ( 'PasswordHelpText' ) }
{ ... password }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'CalibreLibrary' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "library"
helpText = { translate ( 'LibraryHelpText' ) }
{ ... library }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
Convert to format
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreOutputFormat' ) }
body = { 'Specify the output format. Options are: MOBI, EPUB, AZW3, DOCX, FB2, HTMLZ, LIT, LRF, PDB, PDF, PMLZ, RB, RTF, SNB, TCR, TXT, TXTZ, ZIP' }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "outputFormat"
helpText = { translate ( 'OutputFormatHelpText' ) }
{ ... outputFormat }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
Calibre Output Profile
< Popover
anchor = {
< Icon
className = { styles . labelIcon }
name = { icons . INFO }
/ >
}
title = { translate ( 'CalibreOutputProfile' ) }
body = { 'Specify the output profile. The output profile tells the Calibre conversion system how to optimize the created document for the specified device (such as by resizing images for the device screen size). In some cases, an output profile can be used to optimize the output for a particular device, but this is rarely necessary.' }
position = { tooltipPositions . RIGHT }
/ >
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . SELECT }
name = "outputProfile"
values = { calibreProfiles . options }
helpText = { profileHelpText }
{ ... outputProfile }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel >
{ translate ( 'UseSSL' ) }
< / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . CHECK }
name = "useSsl"
helpText = { translate ( 'UseSslHelpText' ) }
{ ... useSsl }
onChange = { onInputChange }
/ >
< / F o r m G r o u p >
< / d i v >
}
< / F i e l d S e t >
< / F o r m >
}