client: 2368 Allow to enable DHCP even if there's another DHCP found on the network
Squashed commit of the following:
commit 2411b36b07b263c9a752f17f676bae93c15e430d
Merge: 8b8740fd3 88d44b437
Author: Artem Baskal <a.baskal@adguard.com>
Date: Tue Dec 8 14:11:15 2020 +0300
Merge branch 'master' into fix/2368
commit 8b8740fd3f379ed1b17c3da27c748df9238efc77
Author: Artem Baskal <a.baskal@adguard.com>
Date: Mon Dec 7 16:51:45 2020 +0300
+ client: 2368 Allow to enable DHCP even if there's another DHCP found on the network
This commit is contained in:
parent
88d44b4370
commit
6aacb2105c
|
@ -113,9 +113,6 @@ const Dhcp = () => {
|
|||
const enteredSomeValue = enteredSomeV4Value || enteredSomeV6Value || interfaceName;
|
||||
|
||||
const getToggleDhcpButton = () => {
|
||||
const otherDhcpFound = check && (check.v4.other_server.found === STATUS_RESPONSE.YES
|
||||
|| check.v6.other_server.found === STATUS_RESPONSE.YES);
|
||||
|
||||
const filledConfig = interface_name && (Object.values(v4)
|
||||
.every(Boolean) || Object.values(v6)
|
||||
.every(Boolean));
|
||||
|
@ -141,7 +138,7 @@ const Dhcp = () => {
|
|||
className={className}
|
||||
onClick={enabled ? onClickDisable : onClickEnable}
|
||||
disabled={processingDhcp || processingConfig
|
||||
|| (!enabled && (!filledConfig || !check || otherDhcpFound))}
|
||||
|| (!enabled && (!filledConfig || !check))}
|
||||
>
|
||||
<Trans>{enabled ? 'dhcp_disable' : 'dhcp_enable'}</Trans>
|
||||
</button>;
|
||||
|
|
Loading…
Reference in New Issue