Fixed initial values and string interpolation
This commit is contained in:
parent
24be7ce4ed
commit
beb94741cf
|
@ -163,10 +163,10 @@
|
||||||
"install_settings_title": "Admin Web Interface",
|
"install_settings_title": "Admin Web Interface",
|
||||||
"install_settings_listen": "Listen interface",
|
"install_settings_listen": "Listen interface",
|
||||||
"install_settings_port": "Port",
|
"install_settings_port": "Port",
|
||||||
"install_settings_interface_link": "Your AdGuard Home admin web interface is available on {{link}}",
|
"install_settings_interface_link": "Your AdGuard Home admin web interface is available on <0>{{link}}</0>",
|
||||||
"form_error_port": "Enter valid port value",
|
"form_error_port": "Enter valid port value",
|
||||||
"install_settings_dns": "DNS server",
|
"install_settings_dns": "DNS server",
|
||||||
"install_settings_dns_desc": "You will need to configure your devices or router to use the DNS server at {{ip}}",
|
"install_settings_dns_desc": "You will need to configure your devices or router to use the DNS server at <0>{{ip}}</0>",
|
||||||
"install_auth_title": "Authentication",
|
"install_auth_title": "Authentication",
|
||||||
"install_auth_desc": "It is highly recommended to configure password authentication to your AdGuard Home admin web interface. Even if it is accessible only in your local network, it is still important to have it protected from unrestricted access.",
|
"install_auth_desc": "It is highly recommended to configure password authentication to your AdGuard Home admin web interface. Even if it is accessible only in your local network, it is still important to have it protected from unrestricted access.",
|
||||||
"install_auth_username": "Username",
|
"install_auth_username": "Username",
|
||||||
|
|
|
@ -97,21 +97,9 @@ class Dhcp extends Component {
|
||||||
'btn btn-primary btn-standard btn-loading': dhcp.processingStatus,
|
'btn btn-primary btn-standard btn-loading': dhcp.processingStatus,
|
||||||
});
|
});
|
||||||
const {
|
const {
|
||||||
gateway_ip,
|
|
||||||
interface_name,
|
interface_name,
|
||||||
lease_duration,
|
...values
|
||||||
range_end,
|
|
||||||
range_start,
|
|
||||||
subnet_mask,
|
|
||||||
} = dhcp.config;
|
} = dhcp.config;
|
||||||
const initialForm = {
|
|
||||||
gateway_ip,
|
|
||||||
lease_duration,
|
|
||||||
range_end,
|
|
||||||
range_start,
|
|
||||||
subnet_mask,
|
|
||||||
};
|
|
||||||
const initialSelect = { interface_name };
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
@ -121,14 +109,14 @@ class Dhcp extends Component {
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Interface
|
<Interface
|
||||||
onChange={this.handleFormSubmit}
|
onChange={this.handleFormSubmit}
|
||||||
initialValues={initialSelect}
|
initialValues={{ interface_name }}
|
||||||
interfaces={dhcp.interfaces}
|
interfaces={dhcp.interfaces}
|
||||||
processing={dhcp.processingInterfaces}
|
processing={dhcp.processingInterfaces}
|
||||||
enabled={dhcp.config.enabled}
|
enabled={dhcp.config.enabled}
|
||||||
/>
|
/>
|
||||||
<Form
|
<Form
|
||||||
onSubmit={this.handleFormSubmit}
|
onSubmit={this.handleFormSubmit}
|
||||||
initialValues={initialForm}
|
initialValues={{ ...values }}
|
||||||
interfaces={dhcp.interfaces}
|
interfaces={dhcp.interfaces}
|
||||||
processingConfig={dhcp.processingConfig}
|
processingConfig={dhcp.processingConfig}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -80,7 +80,12 @@ let Settings = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="setup__desc">
|
<div className="setup__desc">
|
||||||
<Trans>install_settings_interface_link</Trans> <a href={`http://${interfaceIp}`}>{`http://${interfaceIp}`}</a>
|
<Trans
|
||||||
|
components={[<a href={`http://${interfaceIp}`} key="0">link</a>]}
|
||||||
|
values={{ link: `http://${interfaceIp}` }}
|
||||||
|
>
|
||||||
|
install_settings_interface_link
|
||||||
|
</Trans>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="setup__group">
|
<div className="setup__group">
|
||||||
|
@ -121,7 +126,12 @@ let Settings = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="setup__desc">
|
<p className="setup__desc">
|
||||||
<Trans>install_settings_dns_desc</Trans> <strong>{dnsIp}</strong>
|
<Trans
|
||||||
|
components={[<strong key="0">ip</strong>]}
|
||||||
|
values={{ ip: dnsIp }}
|
||||||
|
>
|
||||||
|
install_settings_dns_desc
|
||||||
|
</Trans>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Controls invalid={invalid} />
|
<Controls invalid={invalid} />
|
||||||
|
|
Loading…
Reference in New Issue