New: (UI) Show advanced settings toggle in application modal content

pull/1765/head
Bogdan 1 year ago
parent e2e52746bb
commit 79fbb2d0d7

@ -17,7 +17,7 @@ function AdvancedSettingsButton(props) {
return (
<Link
className={styles.button}
title={advancedSettings ? translate('ShownClickToHide') : translate('HiddenClickToShow')}
title={advancedSettings ? translate('AdvancedSettingsShownClickToHide') : translate('AdvancedSettingsHiddenClickToShow')}
onPress={onAdvancedSettingsPress}
>
<Icon

@ -14,6 +14,7 @@ import ModalContent from 'Components/Modal/ModalContent';
import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds } from 'Helpers/Props';
import AdvancedSettingsButton from 'Settings/AdvancedSettingsButton';
import translate from 'Utilities/String/translate';
import styles from './EditApplicationModalContent.css';
@ -38,6 +39,7 @@ function EditApplicationModalContent(props) {
onSavePress,
onTestPress,
onDeleteApplicationPress,
onAdvancedSettingsPress,
...otherProps
} = props;
@ -149,6 +151,12 @@ function EditApplicationModalContent(props) {
</Button>
}
<AdvancedSettingsButton
advancedSettings={advancedSettings}
onAdvancedSettingsPress={onAdvancedSettingsPress}
showLabel={false}
/>
<SpinnerErrorButton
isSpinning={isTesting}
error={saveError}
@ -188,7 +196,8 @@ EditApplicationModalContent.propTypes = {
onModalClose: PropTypes.func.isRequired,
onSavePress: PropTypes.func.isRequired,
onTestPress: PropTypes.func.isRequired,
onDeleteApplicationPress: PropTypes.func
onDeleteApplicationPress: PropTypes.func,
onAdvancedSettingsPress: PropTypes.func.isRequired
};
export default EditApplicationModalContent;

@ -2,7 +2,13 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { saveApplication, setApplicationFieldValue, setApplicationValue, testApplication } from 'Store/Actions/settingsActions';
import {
saveApplication,
setApplicationFieldValue,
setApplicationValue,
testApplication,
toggleAdvancedSettings
} from 'Store/Actions/settingsActions';
import createProviderSettingsSelector from 'Store/Selectors/createProviderSettingsSelector';
import EditApplicationModalContent from './EditApplicationModalContent';
@ -23,7 +29,8 @@ const mapDispatchToProps = {
setApplicationValue,
setApplicationFieldValue,
saveApplication,
testApplication
testApplication,
toggleAdvancedSettings
};
class EditApplicationModalContentConnector extends Component {
@ -56,6 +63,10 @@ class EditApplicationModalContentConnector extends Component {
this.props.testApplication({ id: this.props.id });
};
onAdvancedSettingsPress = () => {
this.props.toggleAdvancedSettings();
};
//
// Render
@ -67,6 +78,7 @@ class EditApplicationModalContentConnector extends Component {
onTestPress={this.onTestPress}
onInputChange={this.onInputChange}
onFieldChange={this.onFieldChange}
onAdvancedSettingsPress={this.onAdvancedSettingsPress}
/>
);
}
@ -82,7 +94,8 @@ EditApplicationModalContentConnector.propTypes = {
setApplicationFieldValue: PropTypes.func,
saveApplication: PropTypes.func,
testApplication: PropTypes.func,
onModalClose: PropTypes.func.isRequired
onModalClose: PropTypes.func.isRequired,
toggleAdvancedSettings: PropTypes.func.isRequired
};
export default connect(createMapStateToProps, mapDispatchToProps)(EditApplicationModalContentConnector);

@ -16,6 +16,8 @@
"Added": "Added",
"AddedToDownloadClient": "Release added to client",
"AddingTag": "Adding tag",
"AdvancedSettingsHiddenClickToShow": "Advanced settings hidden, click to show",
"AdvancedSettingsShownClickToHide": "Advanced settings shown, click to hide",
"Age": "Age",
"Album": "Album",
"All": "All",
@ -183,7 +185,6 @@
"Grabs": "Grabs",
"Health": "Health",
"HealthNoIssues": "No issues with your configuration",
"HiddenClickToShow": "Hidden, click to show",
"HideAdvanced": "Hide Advanced",
"History": "History",
"HistoryCleanup": "History Cleanup",
@ -414,7 +415,6 @@
"ShowAdvanced": "Show Advanced",
"ShowSearch": "Show Search",
"ShowSearchHelpText": "Show search button on hover",
"ShownClickToHide": "Advanced settings shown, click to hide",
"Shutdown": "Shutdown",
"Size": "Size",
"Sort": "Sort",

Loading…
Cancel
Save