+ client: Allow Fastest IP address and Parallel requests to toggle each other: Merge pull request #619 in DNS/adguard-home from feature/1678 to master
Close #1678 Squashed commit of the following: commit 9251ed0f1b58426104d1b9bdaa4b7af5f92be83e Author: ArtemBaskal <a.baskal@adguard.com> Date: Thu May 21 18:25:18 2020 +0300 + client: Allow `Fastest IP address` and `Parallel requests` to toggle each other
This commit is contained in:
@@ -374,3 +374,8 @@ export const ACTION = {
|
||||
block: 'block',
|
||||
unblock: 'unblock',
|
||||
};
|
||||
|
||||
export const DNS_REQUEST_OPTIONS = {
|
||||
PARALLEL_REQUESTS: 'parallel_requests',
|
||||
FASTEST_ADDR: 'fastest_addr',
|
||||
};
|
||||
|
||||
@@ -119,11 +119,19 @@ renderGroupField.propTypes = {
|
||||
};
|
||||
|
||||
export const renderRadioField = ({
|
||||
input, placeholder, disabled, meta: { touched, error },
|
||||
input,
|
||||
placeholder,
|
||||
subtitle,
|
||||
disabled,
|
||||
meta: { touched, error },
|
||||
}) => <Fragment>
|
||||
<label className="custom-control custom-radio custom-control-inline">
|
||||
<label className="custom-control custom-radio">
|
||||
<input {...input} type="radio" className="custom-control-input" disabled={disabled} />
|
||||
<span className="custom-control-label">{placeholder}</span>
|
||||
{subtitle && <span
|
||||
className="checkbox__label-subtitle"
|
||||
dangerouslySetInnerHTML={{ __html: subtitle }}
|
||||
/>}
|
||||
</label>
|
||||
{!disabled
|
||||
&& touched
|
||||
@@ -133,6 +141,7 @@ export const renderRadioField = ({
|
||||
renderRadioField.propTypes = {
|
||||
input: PropTypes.object.isRequired,
|
||||
placeholder: PropTypes.string,
|
||||
subtitle: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
meta: PropTypes.shape({
|
||||
touched: PropTypes.bool,
|
||||
@@ -155,12 +164,10 @@ export const renderSelectField = ({
|
||||
<span className="checkbox__label">
|
||||
<span className="checkbox__label-text checkbox__label-text--long">
|
||||
<span className="checkbox__label-title">{placeholder}</span>
|
||||
{subtitle && (
|
||||
<span
|
||||
className="checkbox__label-subtitle"
|
||||
dangerouslySetInnerHTML={{ __html: subtitle }}
|
||||
/>
|
||||
)}
|
||||
{subtitle && <span
|
||||
className="checkbox__label-subtitle"
|
||||
dangerouslySetInnerHTML={{ __html: subtitle }}
|
||||
/>}
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user