* client: if 0.0.0.0 is selected, then redirect to the current IP

Closes #655
This commit is contained in:
Ildar Kamalov
2019-03-29 16:24:59 +03:00
parent 23ac1726b7
commit 0c973334be
6 changed files with 40 additions and 14 deletions

View File

@@ -2,12 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import { getIpList, getDnsAddress, getWebAddress } from '../../helpers/helpers';
import { ALL_INTERFACES_IP } from '../../helpers/constants';
const AddressList = (props) => {
let webAddress = getWebAddress(props.address, props.port);
let dnsAddress = getDnsAddress(props.address, props.port);
if (props.address === '0.0.0.0') {
if (props.address === ALL_INTERFACES_IP) {
return getIpList(props.interfaces).map((ip) => {
webAddress = getWebAddress(ip, props.port);
dnsAddress = getDnsAddress(ip, props.port);