diff --git a/src/components/liskAmount/index.js b/src/components/liskAmount/index.js index 2ceb9add7..1b7c869dc 100644 --- a/src/components/liskAmount/index.js +++ b/src/components/liskAmount/index.js @@ -6,7 +6,7 @@ const roundTo = (value, places) => { if (!places) { return value; } - const x = Math.pow(10, places); + const x = 10 ** places; return Math.round(value * x) / x; }; diff --git a/src/components/login/login.css b/src/components/login/login.css index de141fc81..24aef7f6e 100644 --- a/src/components/login/login.css +++ b/src/components/login/login.css @@ -6,3 +6,15 @@ .newAccount { margin-right: 8px; } + +.network ul{ + text-align: left; +} +.error { + display: inline-block; + text-align:left; + width: 100%; +} +.field { + margin-top: 10px; +} diff --git a/src/components/login/loginForm.js b/src/components/login/loginForm.js index 38532f60c..3eb42ffdf 100644 --- a/src/components/login/loginForm.js +++ b/src/components/login/loginForm.js @@ -60,10 +60,13 @@ class LoginForm extends React.Component { return reg.test(url) ? url : `http://${url}`; }; + const isDefaultPort = url => (url.indexOf(':80') || url.indexOf(':443')) !== -1; + let addressValidity = ''; try { const url = new URL(addHttp(value)); - addressValidity = url && url.port !== '' ? '' : 'URL is invalid'; + const port = isDefaultPort(value) || url.port !== ''; + addressValidity = url && port ? '' : 'URL is invalid'; } catch (e) { addressValidity = 'URL is invalid'; } @@ -133,17 +136,23 @@ class LoginForm extends React.Component { onChange={this.changeHandler.bind(this, 'network')} label='Select a network' value={this.state.network} - className='network' + className={`${styles.network} network`} /> { this.state.network === 2 && - + } @@ -151,6 +160,7 @@ class LoginForm extends React.Component { checked={this.state.showPassphrase} label="Show passphrase" className={`${grid['start-xs']} show-passphrase`} + theme={styles} onChange={this.changeHandler.bind(this, 'showPassphrase')} />