mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
6581b3a2c5
* New: UI Updates, Tag manager, More custom filters * fixup! Fix ScanFixture Unit Tests * Fixed: Sentry Errors from UI don't have release, branch, environment * Changed: Bump Mobile Detect for New Device Detection * Fixed: Build on changes to package.json * fixup! Add MetadataProfile filter option * fixup! Tag Note, Blacklist, Manual Import * fixup: Remove connectSection * fixup: root folder comment
85 lines
2.0 KiB
JavaScript
85 lines
2.0 KiB
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { inputTypes } from 'Helpers/Props';
|
|
import FieldSet from 'Components/FieldSet';
|
|
import FormGroup from 'Components/Form/FormGroup';
|
|
import FormLabel from 'Components/Form/FormLabel';
|
|
import FormInputGroup from 'Components/Form/FormInputGroup';
|
|
|
|
function BackupSettings(props) {
|
|
const {
|
|
advancedSettings,
|
|
settings,
|
|
onInputChange
|
|
} = props;
|
|
|
|
const {
|
|
backupFolder,
|
|
backupInterval,
|
|
backupRetention
|
|
} = settings;
|
|
|
|
if (!advancedSettings) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<FieldSet legend="Backups">
|
|
<FormGroup
|
|
advancedSettings={advancedSettings}
|
|
isAdvanced={true}
|
|
>
|
|
<FormLabel>Folder</FormLabel>
|
|
|
|
<FormInputGroup
|
|
type={inputTypes.TEXT}
|
|
name="backupFolder"
|
|
helpText="Relative paths will be under Lidarr's AppData directory"
|
|
onChange={onInputChange}
|
|
{...backupFolder}
|
|
/>
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
advancedSettings={advancedSettings}
|
|
isAdvanced={true}
|
|
>
|
|
<FormLabel>Interval</FormLabel>
|
|
|
|
<FormInputGroup
|
|
type={inputTypes.NUMBER}
|
|
name="backupInterval"
|
|
unit="days"
|
|
helpText="Interval to backup the Lidarr DB and settings"
|
|
onChange={onInputChange}
|
|
{...backupInterval}
|
|
/>
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
advancedSettings={advancedSettings}
|
|
isAdvanced={true}
|
|
>
|
|
<FormLabel>Retention</FormLabel>
|
|
|
|
<FormInputGroup
|
|
type={inputTypes.NUMBER}
|
|
name="backupRetention"
|
|
unit="days"
|
|
helpText="Automatic backups older than the retention will be cleaned up automatically"
|
|
onChange={onInputChange}
|
|
{...backupRetention}
|
|
/>
|
|
</FormGroup>
|
|
</FieldSet>
|
|
);
|
|
}
|
|
|
|
BackupSettings.propTypes = {
|
|
advancedSettings: PropTypes.bool.isRequired,
|
|
settings: PropTypes.object.isRequired,
|
|
onInputChange: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default BackupSettings;
|