sms verification: polish UI, linting issues 👕

This commit is contained in:
Jannis R 2016-11-10 16:23:09 +01:00
parent afdda48ab5
commit bd839d019c
No known key found for this signature in database
GPG Key ID: 0FE83946296A88A5
3 changed files with 8 additions and 10 deletions

View File

@ -61,7 +61,7 @@ export default class GatherData extends Component {
render () { render () {
const { numberIsValid } = this.state; const { numberIsValid } = this.state;
const { isVerified, hasRequested } = this.props.data; const { isVerified } = this.props.data;
// TODO: proper legal text // TODO: proper legal text
return ( return (
@ -79,14 +79,14 @@ export default class GatherData extends Component {
label={ 'phone number' } label={ 'phone number' }
hint={ 'the SMS will be sent to this number' } hint={ 'the SMS will be sent to this number' }
error={ numberIsValid ? null : 'invalid number' } error={ numberIsValid ? null : 'invalid number' }
disabled={ isVerified || hasRequested } disabled={ isVerified }
onChange={ this.numberOnChange } onChange={ this.numberOnChange }
onSubmit={ this.numberOnSubmit } onSubmit={ this.numberOnSubmit }
/> />
<Checkbox <Checkbox
className={ styles.spacing } className={ styles.spacing }
label={ 'I agree that my number will be stored.' } label={ 'I agree that my number will be stored.' }
disabled={ isVerified || hasRequested } disabled={ isVerified }
onCheck={ this.consentOnChange } onCheck={ this.consentOnChange }
/> />
</Form> </Form>
@ -140,7 +140,7 @@ export default class GatherData extends Component {
if (hasRequested) { if (hasRequested) {
return ( return (
<div className={ styles.container }> <div className={ styles.container }>
<ErrorIcon /> <InfoIcon />
<p className={ styles.message }>You already requested verification.</p> <p className={ styles.message }>You already requested verification.</p>
</div> </div>
); );

View File

@ -18,8 +18,6 @@ import React, { Component, PropTypes } from 'react';
import { Form, Input } from '../../../ui'; import { Form, Input } from '../../../ui';
// import styles from './gatherData.css';
const isValidCode = /^[A-Z0-9_-]{7,14}$/i; const isValidCode = /^[A-Z0-9_-]{7,14}$/i;
export default class QueryCode extends Component { export default class QueryCode extends Component {

View File

@ -18,10 +18,10 @@ import React, { Component, PropTypes } from 'react';
import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all';
import ContentClear from 'material-ui/svg-icons/content/clear'; import ContentClear from 'material-ui/svg-icons/content/clear';
import { BusyStep, CompletedStep, Button, IdentityIcon, Modal } from '../../ui'; import { Button, IdentityIcon, Modal } from '../../ui';
import { validateAddress, validateUint } from '../../util/validation';
import ABI from '../../contracts/abi/sms-verification.json'; import ABI from '../../contracts/abi/sms-verification.json';
// TODO: move this to a better place
const contract = '0xcE381B876A85A72303f7cA7b3a012f58F4CEEEeB'; const contract = '0xcE381B876A85A72303f7cA7b3a012f58F4CEEEeB';
import GatherData from './GatherData'; import GatherData from './GatherData';
@ -120,9 +120,9 @@ export default class SMSVerification extends Component {
const { step } = this.state; const { step } = this.state;
if (step === 4) { if (step === 4) {
return this.renderFifthStep(); return this.renderFifthStep();
} else if (step === 3) { } else if (step === 3) {
return this.renderFourthStep(); return this.renderFourthStep();
} else if (step === 2) { } else if (step === 2) {
return this.renderThirdStep(); return this.renderThirdStep();
} else if (step === 1) { } else if (step === 1) {
return this.renderSecondStep(); return this.renderSecondStep();