mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
Linting fixes for frontend following eslint package upgrade
This commit is contained in:
@@ -30,34 +30,34 @@ class CustomFormat extends Component {
|
||||
|
||||
onEditCustomFormatPress = () => {
|
||||
this.setState({ isEditCustomFormatModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditCustomFormatModalClose = () => {
|
||||
this.setState({ isEditCustomFormatModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onExportCustomFormatPress = () => {
|
||||
this.setState({ isExportCustomFormatModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onExportCustomFormatModalClose = () => {
|
||||
this.setState({ isExportCustomFormatModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteCustomFormatPress = () => {
|
||||
this.setState({
|
||||
isEditCustomFormatModalOpen: false,
|
||||
isDeleteCustomFormatModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteCustomFormatModalClose = () => {
|
||||
this.setState({ isDeleteCustomFormatModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDeleteCustomFormat = () => {
|
||||
this.props.onConfirmDeleteCustomFormat(this.props.id);
|
||||
}
|
||||
};
|
||||
|
||||
onCloneCustomFormatPress = () => {
|
||||
const {
|
||||
@@ -66,7 +66,7 @@ class CustomFormat extends Component {
|
||||
} = this.props;
|
||||
|
||||
onCloneCustomFormatPress(id);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -33,18 +33,18 @@ class CustomFormats extends Component {
|
||||
isCustomFormatModalOpen: true,
|
||||
tagsFromId: id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onEditCustomFormatPress = () => {
|
||||
this.setState({ isCustomFormatModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onModalClose = () => {
|
||||
this.setState({
|
||||
isCustomFormatModalOpen: false,
|
||||
tagsFromId: undefined
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -34,11 +34,11 @@ class CustomFormatsConnector extends Component {
|
||||
|
||||
onConfirmDeleteCustomFormat = (id) => {
|
||||
this.props.dispatchDeleteCustomFormat({ id });
|
||||
}
|
||||
};
|
||||
|
||||
onCloneCustomFormatPress = (id) => {
|
||||
this.props.dispatchCloneCustomFormat({ id });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -24,7 +24,7 @@ class EditCustomFormatModal extends Component {
|
||||
if (this.state.height === 'auto' || height > this.state.height) {
|
||||
this.setState({ height });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -20,7 +20,7 @@ class EditCustomFormatModalConnector extends Component {
|
||||
onModalClose = () => {
|
||||
this.props.clearPendingChanges({ section: 'settings.customFormats' });
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -42,26 +42,26 @@ class EditCustomFormatModalContent extends Component {
|
||||
|
||||
onAddSpecificationPress = () => {
|
||||
this.setState({ isAddSpecificationModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onAddSpecificationModalClose = ({ specificationSelected = false } = {}) => {
|
||||
this.setState({
|
||||
isAddSpecificationModalOpen: false,
|
||||
isEditSpecificationModalOpen: specificationSelected
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onEditSpecificationModalClose = () => {
|
||||
this.setState({ isEditSpecificationModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onImportPress = () => {
|
||||
this.setState({ isImportCustomFormatModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onImportCustomFormatModalClose = () => {
|
||||
this.setState({ isImportCustomFormatModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+4
-4
@@ -54,19 +54,19 @@ class EditCustomFormatModalContentConnector extends Component {
|
||||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.props.setCustomFormatValue({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onSavePress = () => {
|
||||
this.props.saveCustomFormat({ id: this.props.id });
|
||||
}
|
||||
};
|
||||
|
||||
onCloneSpecificationPress = (id) => {
|
||||
this.props.cloneCustomFormatSpecification({ id });
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDeleteSpecification = (id) => {
|
||||
this.props.deleteCustomFormatSpecification({ id });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -24,7 +24,7 @@ class ExportCustomFormatModal extends Component {
|
||||
if (this.state.height === 'auto' || height > this.state.height) {
|
||||
this.setState({ height });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -24,7 +24,7 @@ class ImportCustomFormatModal extends Component {
|
||||
if (this.state.height === 'auto' || height > this.state.height) {
|
||||
this.setState({ height });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -42,13 +42,13 @@ class ImportCustomFormatModalContent extends Component {
|
||||
|
||||
onChange = (event) => {
|
||||
this.setState({ json: event.value });
|
||||
}
|
||||
};
|
||||
|
||||
onImportPress = () => {
|
||||
this.setState({ isSpinning: true });
|
||||
// this is a bodge as we need to register a isSpinning: true to get the spinner button to update
|
||||
this._importTimeout = setTimeout(this.doImport, 250);
|
||||
}
|
||||
};
|
||||
|
||||
doImport = () => {
|
||||
const parseError = this.props.onImportPress(this.state.json);
|
||||
@@ -60,7 +60,7 @@ class ImportCustomFormatModalContent extends Component {
|
||||
if (!parseError) {
|
||||
this.props.onModalClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+5
-5
@@ -53,7 +53,7 @@ class ImportCustomFormatModalContentConnector extends Component {
|
||||
this.props.clearPendingChanges({ section: 'settings.customFormats' });
|
||||
this.props.clearCustomFormatSpecificationPending();
|
||||
this.props.deleteAllCustomFormatSpecification();
|
||||
}
|
||||
};
|
||||
|
||||
onImportPress = (payload) => {
|
||||
|
||||
@@ -71,7 +71,7 @@ class ImportCustomFormatModalContentConnector extends Component {
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
parseCf = (cf) => {
|
||||
for (const [key, value] of Object.entries(cf)) {
|
||||
@@ -83,7 +83,7 @@ class ImportCustomFormatModalContentConnector extends Component {
|
||||
this.props.setCustomFormatValue({ name: key, value });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
parseSpecification = (spec) => {
|
||||
const selectedImplementation = _.find(this.props.specificationSchema, { implementation: spec.implementation });
|
||||
@@ -103,7 +103,7 @@ class ImportCustomFormatModalContentConnector extends Component {
|
||||
}
|
||||
|
||||
this.props.saveCustomFormatSpecification();
|
||||
}
|
||||
};
|
||||
|
||||
parseFields = (fields, schema) => {
|
||||
for (const [key, value] of Object.entries(fields)) {
|
||||
@@ -114,7 +114,7 @@ class ImportCustomFormatModalContentConnector extends Component {
|
||||
|
||||
this.props.setCustomFormatSpecificationFieldValue({ name: key, value });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class AddSpecificationItem extends Component {
|
||||
} = this.props;
|
||||
|
||||
this.props.onSpecificationSelect({ implementation });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class AddSpecificationModalContentConnector extends Component {
|
||||
onSpecificationSelect = ({ implementation, name }) => {
|
||||
this.props.selectCustomFormatSpecificationSchema({ implementation, presetName: name });
|
||||
this.props.onModalClose({ specificationSelected: true });
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class AddSpecificationPresetMenuItem extends Component {
|
||||
name,
|
||||
implementation
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class EditSpecificationModalConnector extends Component {
|
||||
onModalClose = () => {
|
||||
this.props.dispatchClearPendingChanges();
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
+4
-4
@@ -33,21 +33,21 @@ class EditSpecificationModalContentConnector extends Component {
|
||||
|
||||
onInputChange = ({ name, value }) => {
|
||||
this.props.setCustomFormatSpecificationValue({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onFieldChange = ({ name, value }) => {
|
||||
this.props.setCustomFormatSpecificationFieldValue({ name, value });
|
||||
}
|
||||
};
|
||||
|
||||
onCancelPress = () => {
|
||||
this.props.clearCustomFormatSpecificationPending();
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
onSavePress = () => {
|
||||
this.props.saveCustomFormatSpecification({ id: this.props.id });
|
||||
this.props.onModalClose();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
@@ -28,30 +28,30 @@ class Specification extends Component {
|
||||
|
||||
onEditSpecificationPress = () => {
|
||||
this.setState({ isEditSpecificationModalOpen: true });
|
||||
}
|
||||
};
|
||||
|
||||
onEditSpecificationModalClose = () => {
|
||||
this.setState({ isEditSpecificationModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteSpecificationPress = () => {
|
||||
this.setState({
|
||||
isEditSpecificationModalOpen: false,
|
||||
isDeleteSpecificationModalOpen: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDeleteSpecificationModalClose = () => {
|
||||
this.setState({ isDeleteSpecificationModalOpen: false });
|
||||
}
|
||||
};
|
||||
|
||||
onCloneSpecificationPress = () => {
|
||||
this.props.onCloneSpecificationPress(this.props.id);
|
||||
}
|
||||
};
|
||||
|
||||
onConfirmDeleteSpecification = () => {
|
||||
this.props.onConfirmDeleteSpecification(this.props.id);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Lifecycle
|
||||
|
||||
Reference in New Issue
Block a user