mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Fixed: Improved root folder setup page
(cherry picked from commit eb4f55de85)
This commit is contained in:
@@ -61,7 +61,7 @@ class AddAuthorOptionsForm extends Component {
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
Monitor
|
||||
{translate('Monitor')}
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
|
||||
@@ -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')}
|
||||
</FormLabel>
|
||||
<FieldSet legend={translate('RootFolder')} >
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('Name')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="name"
|
||||
{...name}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('Path')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={id ? inputTypes.TEXT : inputTypes.PATH}
|
||||
readOnly={!!id}
|
||||
name="path"
|
||||
helpText={translate('PathHelpText')}
|
||||
helpTextWarning={translate('PathHelpTextWarning')}
|
||||
{...path}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<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}
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="name"
|
||||
{...name}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormLabel>
|
||||
</FormGroup>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
isDisabled={!!id}
|
||||
name="isCalibreLibrary"
|
||||
helpText={translate('IsCalibreLibraryHelpText')}
|
||||
{...isCalibreLibrary}
|
||||
onChange={onInputChange}
|
||||
helpLink={'https://manual.calibre-ebook.com/server.html'}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('Path')}
|
||||
</FormLabel>
|
||||
|
||||
{
|
||||
isCalibreLibrary !== undefined && isCalibreLibrary.value &&
|
||||
<div>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreHost')}
|
||||
</FormLabel>
|
||||
<FormInputGroup
|
||||
type={id ? inputTypes.TEXT : inputTypes.PATH}
|
||||
readOnly={!!id}
|
||||
name="path"
|
||||
helpText={translate('PathHelpText')}
|
||||
helpTextWarning={translate('PathHelpTextWarning')}
|
||||
{...path}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
</FieldSet>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="host"
|
||||
helpText={translate('HostHelpText')}
|
||||
{...host}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FieldSet legend={translate('AddedAuthorSettings')} >
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('Monitor')}
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibrePort')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.NUMBER}
|
||||
name="port"
|
||||
helpText={translate('PortHelpText')}
|
||||
{...port}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup
|
||||
advancedSettings={advancedSettings}
|
||||
isAdvanced={true}
|
||||
>
|
||||
<FormLabel>
|
||||
{translate('CalibreUrlBase')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="urlBase"
|
||||
helpText={translate('UrlBaseHelpText')}
|
||||
{...urlBase}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreUsername')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="username"
|
||||
helpText={translate('UsernameHelpText')}
|
||||
{...username}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibrePassword')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.PASSWORD}
|
||||
name="password"
|
||||
helpText={translate('PasswordHelpText')}
|
||||
{...password}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreLibrary')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="library"
|
||||
helpText={translate('LibraryHelpText')}
|
||||
{...library}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<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}
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
</FormLabel>
|
||||
}
|
||||
title={translate('MonitoringOptions')}
|
||||
body={<AuthorMonitoringOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="outputFormat"
|
||||
helpText={translate('OutputFormatHelpText')}
|
||||
{...outputFormat}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_BOOKS_SELECT}
|
||||
name="defaultMonitorOption"
|
||||
onChange={onInputChange}
|
||||
{...defaultMonitorOption}
|
||||
helpText={translate('DefaultMonitorOptionHelpText')}
|
||||
/>
|
||||
|
||||
<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}
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('MonitorNewItems')}
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
</FormLabel>
|
||||
}
|
||||
title={translate('MonitorNewItems')}
|
||||
body={<AuthorMonitorNewItemsOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="outputProfile"
|
||||
values={calibreProfiles.options}
|
||||
helpText={profileHelpText}
|
||||
{...outputProfile}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('UseSSL')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="useSsl"
|
||||
helpText={translate('UseSslHelpText')}
|
||||
{...useSsl}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
</div>
|
||||
}
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('Monitor')}
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title={translate('MonitoringOptions')}
|
||||
body={<AuthorMonitoringOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_NEW_ITEMS_SELECT}
|
||||
name="defaultNewItemMonitorOption"
|
||||
{...defaultNewItemMonitorOption}
|
||||
onChange={onInputChange}
|
||||
helpText={translate('MonitorNewItemsHelpText')}
|
||||
/>
|
||||
</FormLabel>
|
||||
</FormGroup>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_BOOKS_SELECT}
|
||||
name="defaultMonitorOption"
|
||||
onChange={onInputChange}
|
||||
{...defaultMonitorOption}
|
||||
helpText={translate('DefaultMonitorOptionHelpText')}
|
||||
/>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('QualityProfile')}
|
||||
</FormLabel>
|
||||
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('MonitorNewItems')}
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title={translate('MonitorNewItems')}
|
||||
body={<AuthorMonitorNewItemsOptionsPopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
<FormInputGroup
|
||||
type={inputTypes.QUALITY_PROFILE_SELECT}
|
||||
name="defaultQualityProfileId"
|
||||
helpText={translate('DefaultQualityProfileIdHelpText')}
|
||||
{...defaultQualityProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormLabel>
|
||||
</FormGroup>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.MONITOR_NEW_ITEMS_SELECT}
|
||||
name="defaultNewItemMonitorOption"
|
||||
{...defaultNewItemMonitorOption}
|
||||
onChange={onInputChange}
|
||||
helpText={translate('MonitorNewItemsHelpText')}
|
||||
/>
|
||||
</FormGroup>
|
||||
<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}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('QualityProfile')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.QUALITY_PROFILE_SELECT}
|
||||
name="defaultQualityProfileId"
|
||||
helpText={translate('DefaultQualityProfileIdHelpText')}
|
||||
{...defaultQualityProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<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}
|
||||
<FormInputGroup
|
||||
type={inputTypes.METADATA_PROFILE_SELECT}
|
||||
name="defaultMetadataProfileId"
|
||||
helpText={translate('DefaultMetadataProfileIdHelpText')}
|
||||
{...defaultMetadataProfileId}
|
||||
includeNone={true}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormLabel>
|
||||
</FormGroup>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.METADATA_PROFILE_SELECT}
|
||||
name="defaultMetadataProfileId"
|
||||
helpText={translate('DefaultMetadataProfileIdHelpText')}
|
||||
{...defaultMetadataProfileId}
|
||||
includeNone={true}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('DefaultReadarrTags')}
|
||||
</FormLabel>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('DefaultReadarrTags')}
|
||||
</FormLabel>
|
||||
<FormInputGroup
|
||||
type={inputTypes.TAG}
|
||||
name="defaultTags"
|
||||
helpText={translate('DefaultTagsHelpText')}
|
||||
{...defaultTags}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
</FieldSet>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TAG}
|
||||
name="defaultTags"
|
||||
helpText={translate('DefaultTagsHelpText')}
|
||||
{...defaultTags}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FieldSet legend={translate('CalibreSettings')}>
|
||||
<Alert>
|
||||
{translate('CalibreNotCalibreWeb')}
|
||||
</Alert>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('UseCalibreContentServer')}
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title={translate('CalibreContentServer')}
|
||||
body={translate('CalibreContentServerText')}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
isDisabled={!!id}
|
||||
name="isCalibreLibrary"
|
||||
helpText={translate('IsCalibreLibraryHelpText')}
|
||||
{...isCalibreLibrary}
|
||||
onChange={onInputChange}
|
||||
helpLink={'https://manual.calibre-ebook.com/server.html'}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
isCalibreLibrary !== undefined && isCalibreLibrary.value &&
|
||||
<div>
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreHost')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="host"
|
||||
helpText={translate('HostHelpText')}
|
||||
{...host}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibrePort')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.NUMBER}
|
||||
name="port"
|
||||
helpText={translate('PortHelpText')}
|
||||
{...port}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup
|
||||
advancedSettings={advancedSettings}
|
||||
isAdvanced={true}
|
||||
>
|
||||
<FormLabel>
|
||||
{translate('CalibreUrlBase')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="urlBase"
|
||||
helpText={translate('UrlBaseHelpText')}
|
||||
{...urlBase}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreUsername')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="username"
|
||||
helpText={translate('UsernameHelpText')}
|
||||
{...username}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibrePassword')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.PASSWORD}
|
||||
name="password"
|
||||
helpText={translate('PasswordHelpText')}
|
||||
{...password}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('CalibreLibrary')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="library"
|
||||
helpText={translate('LibraryHelpText')}
|
||||
{...library}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<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}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TEXT}
|
||||
name="outputFormat"
|
||||
helpText={translate('OutputFormatHelpText')}
|
||||
{...outputFormat}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<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}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="outputProfile"
|
||||
values={calibreProfiles.options}
|
||||
helpText={profileHelpText}
|
||||
{...outputProfile}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('UseSSL')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="useSsl"
|
||||
helpText={translate('UseSslHelpText')}
|
||||
{...useSsl}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
</div>
|
||||
}
|
||||
</FieldSet>
|
||||
|
||||
</Form>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user