ESLint additional rules (#4186)

* Add eslint rule for consistent block padding

* Fix padding consistency issues

* Eslint test for duplicate imports

* Eslint closing bracket location

* Fix eslint jsx closing bracket

* missed a file

* Formatting

* Manual overrides for auto

* Manual overrides for auto

* More minor auto-override manual adjustments
This commit is contained in:
Jaco Greeff 2017-01-18 13:05:01 +01:00 committed by GitHub
parent d608ad2011
commit 08f80f2695
198 changed files with 1612 additions and 921 deletions

View File

@ -15,8 +15,17 @@
"jsx-quotes": ["error", "prefer-single"],
"no-alert": "error",
"no-debugger": "error",
"no-duplicate-imports": ["error", {
"includeExports": true
}],
"object-curly-spacing": ["error", "always"],
"object-property-newline": 0,
"padded-blocks": ["error", {
"blocks": "never",
"classes": "never",
"switches": "never"
}],
"react/jsx-closing-bracket-location": "error",
"react/jsx-curly-spacing": ["error", "always"]
}
}

View File

@ -67,7 +67,8 @@ export default class AddressSelect extends Component {
<select
className={ styles.iconMenu }
style={ style }
onChange={ this.onChange }>
onChange={ this.onChange }
>
{ addresses.map(this.renderOption) }
</select>
);
@ -80,7 +81,8 @@ export default class AddressSelect extends Component {
return (
<option
key={ account.address }
value={ account.address }>
value={ account.address }
>
{ account.name }
</option>
);

View File

@ -56,7 +56,8 @@ export default class Header extends Component {
style={ { background } }
colSpan={ position ? 1 : 2 }
rowSpan={ position ? 1 : 2 }
onClick={ this.onNavigate(page.path) }>
onClick={ this.onNavigate(page.path) }
>
<div className={ styles.title }>
{ page.title }
</div>

View File

@ -146,7 +146,8 @@ export default class Deployment extends Component {
<label>deployment account</label>
<AddressSelect
addresses={ addresses }
onChange={ this.onChangeFrom } />
onChange={ this.onChangeFrom }
/>
<div className={ styles.hint }>
the owner account to deploy from
</div>
@ -156,7 +157,8 @@ export default class Deployment extends Component {
<input
value={ name }
name='name'
onChange={ this.onChangeName } />
onChange={ this.onChangeName }
/>
<div className={ styles.hint }>
{ nameError || 'an identifying name for the token' }
</div>
@ -167,7 +169,8 @@ export default class Deployment extends Component {
className={ styles.small }
name='tla'
value={ tla }
onChange={ this.onChangeTla } />
onChange={ this.onChangeTla }
/>
<div className={ styles.hint }>
{ tlaError || 'unique network acronym for this token' }
</div>
@ -180,7 +183,8 @@ export default class Deployment extends Component {
max='999999999999'
name='totalSupply'
value={ totalSupply }
onChange={ this.onChangeSupply } />
onChange={ this.onChangeSupply }
/>
<div className={ styles.hint }>
{ totalSupplyError || `number of tokens (base: ${baseText})` }
</div>
@ -191,7 +195,8 @@ export default class Deployment extends Component {
<div
className={ styles.button }
disabled={ hasError }
onClick={ this.onDeploy }>
onClick={ this.onDeploy }
>
Deploy Token
</div>
</div>

View File

@ -32,7 +32,8 @@ export default class IdentityIcon extends Component {
return (
<img
className={ classes }
src={ api.util.createIdentityImg(address, 3) } />
src={ api.util.createIdentityImg(address, 3) }
/>
);
}
}

View File

@ -50,7 +50,8 @@ export default class Owner extends Component {
<span>{ accounts[address].name }</span>
<IdentityIcon
className={ styles.icon }
address={ address } />
address={ address }
/>
</div>
</td>
<td className={ styles.tokens }>
@ -67,7 +68,8 @@ export default class Owner extends Component {
<div key={ token.address }>
<Token
address={ token.address }
tokenreg={ token.tokenreg } />
tokenreg={ token.tokenreg }
/>
<div className={ styles.byline }>
{ token.address }
</div>

View File

@ -88,7 +88,8 @@ export default class Overview extends Component {
<Owner
key={ address }
tokens={ tokens[address] }
address={ address } />
address={ address }
/>
));
}

View File

@ -99,7 +99,8 @@ export default class Events extends Component {
<Event
key={ event.key }
token={ token }
event={ event } />
event={ event }
/>
);
});

View File

@ -149,7 +149,8 @@ export default class Send extends Component {
<label>transfer from</label>
<AddressSelect
addresses={ fromAddresses }
onChange={ this.onSelectFrom } />
onChange={ this.onSelectFrom }
/>
<div className={ styles.hint }>
account to transfer from
</div>
@ -179,7 +180,8 @@ export default class Send extends Component {
step='0.1'
value={ amount }
max={ fromBalance ? fromBalance.balance.div(1000000).toFixed(6) : 1 }
onChange={ this.onAmountChange } />
onChange={ this.onAmountChange }
/>
<div className={ styles.hint }>
{ amountError || maxAmountHint }
</div>
@ -190,7 +192,8 @@ export default class Send extends Component {
<div
className={ styles.button }
disabled={ hasError }
onClick={ this.onSend }>
onClick={ this.onSend }
>
Transfer Tokens
</div>
</div>
@ -206,7 +209,8 @@ export default class Send extends Component {
return tokens.map((token) => (
<option
key={ token.address }
value={ token.address }>
value={ token.address }
>
{ token.coin.tla } / { token.coin.name }
</option>
));

View File

@ -36,7 +36,8 @@ export default class Button extends Component {
className={ classes }
data-warning={ warning }
disabled={ disabled }
onClick={ this.onClick }>
onClick={ this.onClick }
>
{ label }
</button>
);

View File

@ -37,12 +37,14 @@ export default class ButtonBar extends Component {
key='cancel'
label='Cancel'
warning
onClick={ this.onCancelClick } />,
onClick={ this.onCancelClick }
/>,
<Button
key='save'
label={ this.dappsStore.isNew ? 'Register' : 'Update' }
disabled={ !this.dappsStore.canSave }
onClick={ this.onSaveClick } />
onClick={ this.onSaveClick }
/>
];
} else {
buttons = [
@ -51,16 +53,19 @@ export default class ButtonBar extends Component {
label='Delete'
warning
disabled={ !this.dappsStore.currentApp || (!this.dappsStore.currentApp.isOwner && !this.dappsStore.isContractOwner) }
onClick={ this.onDeleteClick } />,
onClick={ this.onDeleteClick }
/>,
<Button
key='edit'
label='Edit'
disabled={ !this.dappsStore.currentApp || !this.dappsStore.currentApp.isOwner }
onClick={ this.onEditClick } />,
onClick={ this.onEditClick }
/>,
<Button
key='new'
label='New'
onClick={ this.onNewClick } />
onClick={ this.onNewClick }
/>
];
}

View File

@ -61,14 +61,16 @@ export default class Dapp extends Component {
const overlayImage = (
<img
className={ styles.overlayImage }
src={ api.util.createIdentityImg(this.dappsStore.currentAccount.address, 4) } />
src={ api.util.createIdentityImg(this.dappsStore.currentAccount.address, 4) }
/>
);
return (
<Input
hint={ this.dappsStore.currentAccount.address }
label='Owner, select the application owner and editor'
overlay={ overlayImage }>
overlay={ overlayImage }
>
<SelectAccount />
</Input>
);
@ -78,14 +80,16 @@ export default class Dapp extends Component {
const overlayImage = (
<img
className={ styles.overlayImage }
src={ api.util.createIdentityImg(app.owner, 4) } />
src={ api.util.createIdentityImg(app.owner, 4) }
/>
);
return (
<Input
hint={ app.owner }
label='Owner, the application owner and editor'
overlay={ overlayImage }>
overlay={ overlayImage }
>
<input value={ app.ownerName } readOnly />
</Input>
);
@ -100,7 +104,8 @@ export default class Dapp extends Component {
overlayImage = (
<img
className={ styles.overlayImage }
src={ `/api/content/${hash.substr(2)}` } />
src={ `/api/content/${hash.substr(2)}` }
/>
);
}
@ -109,13 +114,15 @@ export default class Dapp extends Component {
hint={ app[`${type}Error`] || app[`${type}Url`] || '...' }
label={ label }
key={ `${type}Edit` }
overlay={ overlayImage }>
overlay={ overlayImage }
>
<input
value={ app[`${type}Hash`] || '' }
data-dirty={ app[`${type}Changed`] }
data-error={ !!app[`${type}Error`] }
readOnly={ !this.dappsStore.isEditing && !this.dappsStore.isNew }
onChange={ onChange } />
onChange={ onChange }
/>
</Input>
);
}

View File

@ -53,7 +53,8 @@ export default class ModalDelete extends Component {
<Modal
buttons={ this.renderButtons() }
error={ this.modalStore.errorDelete }
header={ HEADERS[this.modalStore.stepDelete] }>
header={ HEADERS[this.modalStore.stepDelete] }
>
{ this.renderStep() }
</Modal>
);
@ -67,19 +68,22 @@ export default class ModalDelete extends Component {
<Button
key='close'
label='Close'
onClick={ this.onClickClose } />
onClick={ this.onClickClose }
/>
];
case STEP_CONFIRM:
return [
<Button
key='cancel'
label='No, Cancel'
onClick={ this.onClickClose } />,
onClick={ this.onClickClose }
/>,
<Button
key='delete'
label='Yes, Delete'
warning
onClick={ this.onClickYes } />
onClick={ this.onClickYes }
/>
];
default:
return null;

View File

@ -53,7 +53,8 @@ export default class ModalRegister extends Component {
<Modal
buttons={ this.renderButtons() }
error={ this.modalStore.errorRegister }
header={ HEADERS[this.modalStore.stepRegister] }>
header={ HEADERS[this.modalStore.stepRegister] }
>
{ this.renderStep() }
</Modal>
);
@ -67,19 +68,22 @@ export default class ModalRegister extends Component {
<Button
key='close'
label='Close'
onClick={ this.onClickClose } />
onClick={ this.onClickClose }
/>
];
case STEP_CONFIRM:
return [
<Button
key='cancel'
label='No, Cancel'
onClick={ this.onClickClose } />,
onClick={ this.onClickClose }
/>,
<Button
key='register'
label='Yes, Register'
warning
onClick={ this.onClickConfirmYes } />
onClick={ this.onClickConfirmYes }
/>
];
default:
return null;

View File

@ -52,7 +52,8 @@ export default class ModalUpdate extends Component {
<Modal
buttons={ this.renderButtons() }
error={ this.modalStore.errorUpdate }
header={ HEADERS[this.modalStore.stepUpdate] }>
header={ HEADERS[this.modalStore.stepUpdate] }
>
{ this.renderStep() }
</Modal>
);
@ -66,19 +67,22 @@ export default class ModalUpdate extends Component {
<Button
key='close'
label='Close'
onClick={ this.onClickClose } />
onClick={ this.onClickClose }
/>
];
case STEP_CONFIRM:
return [
<Button
key='cancel'
label='No, Cancel'
onClick={ this.onClickClose } />,
onClick={ this.onClickClose }
/>,
<Button
key='delete'
label='Yes, Update'
warning
onClick={ this.onClickYes } />
onClick={ this.onClickYes }
/>
];
default:
return null;

View File

@ -27,7 +27,8 @@ export default class SelectAccount extends Component {
return (
<select
value={ this.dappsStore.currentAccount.address }
onChange={ this.onSelect }>
onChange={ this.onSelect }
>
{ this.renderOptions() }
</select>
);

View File

@ -30,7 +30,8 @@ export default class SelectDapp extends Component {
return (
<Input
hint='...'
label='Application Id, the unique assigned identifier'>
label='Application Id, the unique assigned identifier'
>
<input value={ this.dappsStore.wipApp.id } readOnly />
</Input>
);
@ -51,11 +52,13 @@ export default class SelectDapp extends Component {
<Input
hint={ this.dappsStore.currentApp.id }
label='Application, the actual application details to show below'
overlay={ overlayImg }>
overlay={ overlayImg }
>
<select
disabled={ this.dappsStore.isEditing }
value={ this.dappsStore.currentApp.id }
onChange={ this.onSelect }>
onChange={ this.onSelect }
>
{ this.renderOptions() }
</select>
</Input>
@ -67,7 +70,8 @@ export default class SelectDapp extends Component {
return (
<option
value={ app.id }
key={ app.id }>
key={ app.id }
>
{ app.name }
</option>
);

View File

@ -94,7 +94,8 @@ export default class Application extends Component {
disabled={ registerBusy }
value={ repo }
className={ repoError ? styles.error : null }
onChange={ this.onChangeRepo } />
onChange={ this.onChangeRepo }
/>
</div>,
<div className={ styles.capture } key='hash'>
<input
@ -103,7 +104,8 @@ export default class Application extends Component {
disabled={ registerBusy }
value={ commit }
className={ commitError ? styles.error : null }
onChange={ this.onChangeCommit } />
onChange={ this.onChangeCommit }
/>
</div>
];
} else {
@ -115,7 +117,8 @@ export default class Application extends Component {
disabled={ registerBusy }
value={ url }
className={ urlError ? styles.error : null }
onChange={ this.onChangeUrl } />
onChange={ this.onChangeUrl }
/>
</div>
);
}
@ -128,11 +131,17 @@ export default class Application extends Component {
<Button
disabled={ registerBusy }
invert={ registerType !== 'file' }
onClick={ this.onClickTypeNormal }>File Link</Button>
onClick={ this.onClickTypeNormal }
>
File Link
</Button>
<Button
disabled={ registerBusy }
invert={ registerType !== 'content' }
onClick={ this.onClickTypeContent }>Content Bundle</Button>
onClick={ this.onClickTypeContent }
>
Content Bundle
</Button>
</div>
<div className={ styles.box }>
<div className={ styles.description }>
@ -148,7 +157,8 @@ export default class Application extends Component {
</div>
<Events
eventIds={ this.state.eventIds }
events={ this.state.events } />
events={ this.state.events }
/>
</div>
);
}
@ -167,7 +177,8 @@ export default class Application extends Component {
</div>
<Button
onClick={ this.onClickRegister }
disabled={ (contentHashError && contentHashOwner !== fromAddress) || urlError || repoError || commitError }>register url</Button>
disabled={ (contentHashError && contentHashOwner !== fromAddress) || urlError || repoError || commitError }
>register url</Button>
</div>
);
}

View File

@ -30,7 +30,8 @@ export default class IdentityIcon extends Component {
return (
<img
className={ styles.icon }
src={ api.util.createIdentityImg(address, 3) } />
src={ api.util.createIdentityImg(address, 3) }
/>
);
}
}

View File

@ -25,7 +25,6 @@ import styles from './transaction.css';
import IdentityIcon from '../../githubhint/IdentityIcon';
class BaseTransaction extends Component {
shortHash (hash) {
return `${hash.substr(0, 5)}..${hash.substr(hash.length - 3)}`;
}
@ -89,7 +88,6 @@ class BaseTransaction extends Component {
}
export class Transaction extends BaseTransaction {
static propTypes = {
idx: PropTypes.number.isRequired,
transaction: PropTypes.object.isRequired,
@ -180,7 +178,6 @@ export class Transaction extends BaseTransaction {
}
export class LocalTransaction extends BaseTransaction {
static propTypes = {
hash: PropTypes.string.isRequired,
status: PropTypes.string.isRequired,
@ -376,5 +373,4 @@ export class LocalTransaction extends BaseTransaction {
</tr>
);
}
}

View File

@ -29,7 +29,6 @@ import { select } from './actions';
import styles from './accounts.css';
class Accounts extends Component {
static propTypes = {
all: PropTypes.object.isRequired,
selected: PropTypes.object,

View File

@ -98,5 +98,4 @@ export default class Application extends Component {
</div>
);
}
}

View File

@ -147,7 +147,6 @@ const eventTypes = {
};
class Events extends Component {
static propTypes = {
events: PropTypes.array.isRequired,
pending: PropTypes.object.isRequired,

View File

@ -33,7 +33,8 @@ export default class IdentityIcon extends Component {
<img
className={ styles.icon + ' ' + className }
style={ style }
src={ api.util.createIdentityImg(address, 3) } />
src={ api.util.createIdentityImg(address, 3) }
/>
);
}
}

View File

@ -34,7 +34,6 @@ import { clear, lookup, ownerLookup, reverseLookup } from './actions';
import styles from './lookup.css';
class Lookup extends Component {
static propTypes = {
result: nullableProptype(PropTypes.string.isRequired),

View File

@ -77,7 +77,6 @@ const renderQueue = (queue) => {
};
class Names extends Component {
static propTypes = {
error: nullableProptype(PropTypes.object.isRequired),
fee: PropTypes.object.isRequired,

View File

@ -29,7 +29,6 @@ import { clearError, update } from './actions';
import styles from './records.css';
class Records extends Component {
static propTypes = {
error: nullableProptype(PropTypes.object.isRequired),
pending: PropTypes.bool.isRequired,

View File

@ -80,7 +80,8 @@ export default class Application extends Component {
return (
<Header
blockNumber={ blockNumber }
totalSignatures={ totalSignatures } />
totalSignatures={ totalSignatures }
/>
);
}
@ -95,7 +96,8 @@ export default class Application extends Component {
instance={ instance }
visible={ showImport }
onClose={ this.toggleImport }
onSetFromAddress={ this.setFromAddress } />
onSetFromAddress={ this.setFromAddress }
/>
);
}
@ -112,7 +114,8 @@ export default class Application extends Component {
return (
<Events
accountsInfo={ accountsInfo }
contract={ contract } />
contract={ contract }
/>
);
}

View File

@ -30,7 +30,8 @@ export default class IdentityIcon extends Component {
return (
<img
className={ styles.icon }
src={ api.util.createIdentityImg(address, 3) } />
src={ api.util.createIdentityImg(address, 3) }
/>
);
}
}

View File

@ -24,7 +24,6 @@ import IdentityIcon from '../../IdentityIcon';
import styles from './account-selector.css';
class AccountSelectorItem extends Component {
static propTypes = {
onSelectAccount: PropTypes.func.isRequired,
account: PropTypes.object.isRequired
@ -37,15 +36,19 @@ class AccountSelectorItem extends Component {
delete props.account;
delete props.onSelectAccount;
const icon = (<IdentityIcon
const icon = (
<IdentityIcon
inline center
address={ account.address } />
address={ account.address }
/>
);
const avatar = (<Avatar
const avatar = (
<Avatar
className={ styles.avatar }
backgroundColor='none'
icon={ icon } />
icon={ icon }
/>
);
return (
@ -55,18 +58,17 @@ class AccountSelectorItem extends Component {
primaryText={ account.name }
secondaryText={ account.address }
leftAvatar={ avatar }
{ ...props } />
{ ...props }
/>
);
}
onSelectAccount = () => {
this.props.onSelectAccount(this.props.account.address);
}
}
export default class AccountSelector extends Component {
static propTypes = {
list: PropTypes.array.isRequired,
selected: PropTypes.object.isRequired,
@ -87,7 +89,8 @@ export default class AccountSelector extends Component {
open={ this.state.open }
onSelectAccount={ this.onToggleOpen }
autoGenerateNestedIndicator={ false }
nestedListStyle={ { maxHeight: '14em', overflow: 'auto' } } />
nestedListStyle={ { maxHeight: '14em', overflow: 'auto' } }
/>
);
return (
@ -106,7 +109,8 @@ export default class AccountSelector extends Component {
<AccountSelectorItem
account={ account }
onSelectAccount={ this.onSelectAccount }
key={ index } />
key={ index }
/>
));
}
@ -122,5 +126,4 @@ export default class AccountSelector extends Component {
this.props.handleSetSelected(address);
this.onToggleOpen();
}
}

View File

@ -23,9 +23,11 @@ import { setSelectedAccount } from '../actions';
class AccountSelectorContainer extends Component {
render () {
return (<AccountSelector
return (
<AccountSelector
{ ...this.props }
/>);
/>
);
}
}
@ -42,4 +44,7 @@ const mapDispatchToProps = (dispatch) => {
};
};
export default connect(mapStateToProps, mapDispatchToProps)(AccountSelectorContainer);
export default connect(
mapStateToProps,
mapDispatchToProps
)(AccountSelectorContainer);

View File

@ -35,7 +35,6 @@ const initState = {
};
export default class QueryAction extends Component {
static propTypes = {
show: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
@ -56,7 +55,8 @@ export default class QueryAction extends Component {
open={ this.props.show }
className={ styles.dialog }
onRequestClose={ this.onClose }
actions={ this.renderActions() } >
actions={ this.renderActions() }
>
{ this.renderContent() }
</Dialog>
);
@ -70,7 +70,8 @@ export default class QueryAction extends Component {
<FlatButton
label='Loading...'
primary
disabled />
disabled
/>
);
}
@ -81,7 +82,8 @@ export default class QueryAction extends Component {
<FlatButton
label='Close'
primary
onTouchTap={ this.onClose } />
onTouchTap={ this.onClose }
/>
]);
}
@ -91,12 +93,14 @@ export default class QueryAction extends Component {
<FlatButton
label='Cancel'
primary
onTouchTap={ this.onClose } />,
onTouchTap={ this.onClose }
/>,
<FlatButton
label='Query'
primary
disabled={ !isValid }
onTouchTap={ this.onQuery } />
onTouchTap={ this.onQuery }
/>
]);
}
@ -140,14 +144,16 @@ export default class QueryAction extends Component {
floatingLabelText='Select which field to query'
fullWidth
value={ this.state.queryKey }
onChange={ this.onQueryKeyChange }>
onChange={ this.onQueryKeyChange }
>
<MenuItem value='tla' label='TLA' primaryText='TLA' />
<MenuItem value='address' label='Address' primaryText='Address' />
</SelectField>
{
this.state.queryKey !== 'tla'
? (<InputText
? (
<InputText
key={ 0 }
floatingLabelText="Token's address"
@ -155,8 +161,11 @@ export default class QueryAction extends Component {
validationType={ SIMPLE_TOKEN_ADDRESS_TYPE }
onChange={ this.onChange }
onEnter={ this.onQuery } />)
: (<InputText
onEnter={ this.onQuery }
/>
)
: (
<InputText
key={ 1 }
floatingLabelText="Token's TLA"
@ -164,7 +173,9 @@ export default class QueryAction extends Component {
validationType={ SIMPLE_TLA_TYPE }
onChange={ this.onChange }
onEnter={ this.onQuery } />)
onEnter={ this.onQuery }
/>
)
}
</div>
);
@ -203,5 +214,4 @@ export default class QueryAction extends Component {
this.setState(initState);
this.props.onClose();
}
}

View File

@ -57,7 +57,6 @@ const initState = {
};
export default class RegisterAction extends Component {
static propTypes = {
show: PropTypes.bool.isRequired,
sending: PropTypes.bool.isRequired,
@ -97,7 +96,8 @@ export default class RegisterAction extends Component {
<FlatButton
label='Close'
primary
onTouchTap={ this.onClose } />
onTouchTap={ this.onClose }
/>
);
}
@ -106,7 +106,8 @@ export default class RegisterAction extends Component {
<FlatButton
label='Done'
primary
onTouchTap={ this.onClose } />
onTouchTap={ this.onClose }
/>
);
}
@ -116,12 +117,14 @@ export default class RegisterAction extends Component {
<FlatButton
label='Cancel'
primary
onTouchTap={ this.onClose } />,
onTouchTap={ this.onClose }
/>,
<FlatButton
label={ sending ? 'Sending...' : 'Register' }
primary
disabled={ !isValid || sending }
onTouchTap={ this.onRegister } />
onTouchTap={ this.onRegister }
/>
]);
}
@ -177,7 +180,8 @@ export default class RegisterAction extends Component {
hintText={ field.hintText }
validationType={ field.type }
onChange={ onChange } />
onChange={ onChange }
/>
);
});
}
@ -227,5 +231,4 @@ export default class RegisterAction extends Component {
this.setState(initState);
this.props.onClose();
}
}

View File

@ -29,7 +29,6 @@ const REGISTER_ACTION = 'REGISTER_ACTION';
const QUERY_ACTION = 'QUERY_ACTION';
export default class Actions extends Component {
static propTypes = {
handleRegisterToken: PropTypes.func.isRequired,
handleRegisterClose: PropTypes.func.isRequired,
@ -62,26 +61,30 @@ export default class Actions extends Component {
icon={ <ContentSendIcon /> }
label='Register Token'
primary
onTouchTap={ this.onShowRegister } />
onTouchTap={ this.onShowRegister }
/>
<RaisedButton
className={ styles.button }
icon={ <ActionSearchIcon /> }
label='Search Token'
primary
onTouchTap={ this.onShowQuery } />
onTouchTap={ this.onShowQuery }
/>
<Register
show={ this.state.show[ REGISTER_ACTION ] }
onClose={ this.onRegisterClose }
handleRegisterToken={ this.props.handleRegisterToken }
{ ...this.props.register } />
{ ...this.props.register }
/>
<Query
show={ this.state.show[ QUERY_ACTION ] }
onClose={ this.onQueryClose }
handleQueryToken={ this.props.handleQueryToken }
{ ...this.props.query } />
{ ...this.props.query }
/>
</div>
);
}
@ -113,5 +116,4 @@ export default class Actions extends Component {
}
});
}
}

View File

@ -22,11 +22,12 @@ import Actions from './component';
import { registerToken, registerReset, queryToken, queryReset } from './actions';
class TokensContainer extends Component {
render () {
return (<Actions
return (
<Actions
{ ...this.props }
/>);
/>
);
}
}

View File

@ -56,7 +56,8 @@ export default class Application extends Component {
<div className={ styles.application }>
<Status
address={ contract.address }
fee={ contract.fee } />
fee={ contract.fee }
/>
<Actions />
@ -73,5 +74,4 @@ export default class Application extends Component {
muiTheme
};
}
}

View File

@ -44,7 +44,8 @@ export default class CustomChip extends Component {
background: '#27ae60',
display: 'flex',
flexDirection: 'column'
} }>
} }
>
{ this.renderIcon(isAddress, value) }
<span className={ styles.value } title={ value }>
{ displayValue }
@ -64,7 +65,8 @@ export default class CustomChip extends Component {
return (
<IdentityIcon
inline center
address={ address } />
address={ address }
/>
);
}
}

View File

@ -36,10 +36,12 @@ class Container extends Component {
render () {
const { isLoading, contract } = this.props;
return (<Application
return (
<Application
isLoading={ isLoading }
contract={ contract }
/>);
/>
);
}
}

View File

@ -30,7 +30,8 @@ export default class IdentityIcon extends Component {
return (
<img
className={ styles.icon }
src={ api.util.createIdentityImg(address, 4) } />
src={ api.util.createIdentityImg(address, 4) }
/>
);
}
}

View File

@ -20,11 +20,12 @@ import { connect } from 'react-redux';
import InputText from './input-text';
class InputTextContainer extends Component {
render () {
return (<InputText
return (
<InputText
{ ...this.props }
/>);
/>
);
}
}

View File

@ -35,7 +35,6 @@ const initState = {
};
export default class InputText extends Component {
static propTypes = {
validationType: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
@ -64,7 +63,8 @@ export default class InputText extends Component {
disabled={ disabled }
errorText={ error }
onChange={ this.onChange }
onKeyDown={ this.onKeyDown } />
onKeyDown={ this.onKeyDown }
/>
{ this.renderLoading() }
{ this.renderIsValid() }
@ -146,5 +146,4 @@ export default class InputText extends Component {
return this.props.onChange(false, value);
}
}

View File

@ -38,7 +38,8 @@ export default class Status extends Component {
<Chip
isAddress={ false }
value={ api.util.fromWei(fee).toFixed(3) + 'ETH' }
label='Fee' />
label='Fee'
/>
</div>
);
}

View File

@ -56,7 +56,8 @@ export default class AddMeta extends Component {
icon={ <AddIcon /> }
primary
fullWidth
onTouchTap={ this.onShowDialog } />
onTouchTap={ this.onShowDialog }
/>
<Dialog
title='add meta data'
@ -64,7 +65,8 @@ export default class AddMeta extends Component {
modal={ this.state.complete }
className={ styles.dialog }
onRequestClose={ this.onClose }
actions={ this.renderActions() } >
actions={ this.renderActions() }
>
{ this.renderContent() }
</Dialog>
</div>);
@ -78,7 +80,8 @@ export default class AddMeta extends Component {
<FlatButton
label='Done'
primary
onTouchTap={ this.onClose } />
onTouchTap={ this.onClose }
/>
);
}
@ -88,12 +91,14 @@ export default class AddMeta extends Component {
<FlatButton
label='Cancel'
primary
onTouchTap={ this.onClose } />,
onTouchTap={ this.onClose }
/>,
<FlatButton
label='Add'
primary
disabled={ !isValid }
onTouchTap={ this.onAdd } />
onTouchTap={ this.onAdd }
/>
]);
}
@ -130,7 +135,8 @@ export default class AddMeta extends Component {
floatingLabelText='Choose the meta-data to add'
fullWidth
value={ this.state.metaKeyIndex }
onChange={ this.onMetaKeyChange }>
onChange={ this.onMetaKeyChange }
>
{ this.renderMetaKeyItems() }
@ -142,7 +148,8 @@ export default class AddMeta extends Component {
hintText={ `The value of the ${selectedMeta.label.toLowerCase()} (${selectedMeta.validation === ADDRESS_TYPE ? 'Address' : 'Url Hint'})` }
validationType={ selectedMeta.validation }
onChange={ this.onChange } />
onChange={ this.onChange }
/>
</div>
);
}
@ -152,7 +159,8 @@ export default class AddMeta extends Component {
<MenuItem
value={ index }
key={ index }
label={ key.label } primaryText={ key.label } />
label={ key.label } primaryText={ key.label }
/>
));
}
@ -194,5 +202,4 @@ export default class AddMeta extends Component {
value: ''
} });
}
}

View File

@ -99,7 +99,8 @@ export default class Token extends Component {
return (<div>
<Paper zDepth={ 1 } className={ styles.token } style={ {
backgroundColor: 'none'
} }>
} }
>
<div className={ styles['token-bg'] } />
{ this.renderContent() }
</Paper>
@ -128,7 +129,8 @@ export default class Token extends Component {
floatingLabelText='Choose the meta-data to look-up'
fullWidth
value={ this.state.metaKeyIndex }
onChange={ this.onMetaKeyChange }>
onChange={ this.onMetaKeyChange }
>
{ this.renderMetaKeyItems() }
@ -139,7 +141,8 @@ export default class Token extends Component {
icon={ <FindIcon /> }
primary
fullWidth
onTouchTap={ this.onMetaLookup } />
onTouchTap={ this.onMetaLookup }
/>
</div>
{ this.renderMeta(meta) }
@ -157,7 +160,8 @@ export default class Token extends Component {
<MenuItem
value={ index }
key={ index }
label={ key.label } primaryText={ key.label } />
label={ key.label } primaryText={ key.label }
/>
));
}
@ -169,7 +173,8 @@ export default class Token extends Component {
return (
<Chip
value={ Math.log10(base).toString() }
label='Decimals' />
label='Decimals'
/>
);
}
@ -182,7 +187,8 @@ export default class Token extends Component {
<Chip
isAddress
value={ address }
label='Address' />
label='Address'
/>
);
}
@ -192,7 +198,8 @@ export default class Token extends Component {
return (
<Chip
value={ `${balance.toString()} ${tla}` }
label='Total' />
label='Total'
/>
);
}
@ -212,7 +219,8 @@ export default class Token extends Component {
isAddress
displayValue={ displayValue }
value={ owner }
label='Owner' />
label='Owner'
/>
);
}
@ -237,7 +245,8 @@ export default class Token extends Component {
<AddMeta
handleAddMeta={ this.props.handleAddMeta }
isTokenOwner={ this.props.isTokenOwner }
index={ this.props.index } />
index={ this.props.index }
/>
);
}
@ -253,7 +262,8 @@ export default class Token extends Component {
icon={ <DeleteIcon /> }
secondary
fullWidth
onTouchTap={ this.onUnregister } />
onTouchTap={ this.onUnregister }
/>
);
}

View File

@ -51,9 +51,11 @@ export default class AddAddress extends Component {
title={
<FormattedMessage
id='addAddress.label'
defaultMessage='add saved address' />
defaultMessage='add saved address'
/>
}
visible>
visible
>
{ this.renderFields() }
</Modal>
);
@ -68,20 +70,24 @@ export default class AddAddress extends Component {
label={
<FormattedMessage
id='addAddress.button.close'
defaultMessage='Cancel' />
defaultMessage='Cancel'
/>
}
onClick={ this.onClose }
ref='closeButton' />,
ref='closeButton'
/>,
<Button
disabled={ hasError }
icon={ <ContentAdd /> }
label={
<FormattedMessage
id='addAddress.button.add'
defaultMessage='Save Address' />
defaultMessage='Save Address'
/>
}
onClick={ this.onAdd }
ref='addButton' />
ref='addButton'
/>
]);
}
@ -97,45 +103,54 @@ export default class AddAddress extends Component {
hint={
<FormattedMessage
id='addAddress.input.address.hint'
defaultMessage='the network address for the entry' />
defaultMessage='the network address for the entry'
/>
}
label={
<FormattedMessage
id='addAddress.input.address.label'
defaultMessage='network address' />
defaultMessage='network address'
/>
}
onChange={ this.onEditAddress }
ref='inputAddress'
value={ address } />
value={ address }
/>
<Input
error={ nameError }
hint={
<FormattedMessage
id='addAddress.input.name.hint'
defaultMessage='a descriptive name for the entry' />
defaultMessage='a descriptive name for the entry'
/>
}
label={
<FormattedMessage
id='addAddress.input.name.label'
defaultMessage='address name' />
defaultMessage='address name'
/>
}
onChange={ this.onEditName }
ref='inputName'
value={ name } />
value={ name }
/>
<Input
hint={
<FormattedMessage
id='addAddress.input.description.hint'
defaultMessage='an expanded description for the entry' />
defaultMessage='an expanded description for the entry'
/>
}
label={
<FormattedMessage
id='addAddress.input.description.label'
defaultMessage='(optional) address description' />
defaultMessage='(optional) address description'
/>
}
onChange={ this.onEditDescription }
ref='inputDescription'
value={ description } />
value={ description }
/>
</Form>
);
}

View File

@ -51,13 +51,16 @@ class AddContract extends Component {
<FormattedMessage
id='addContract.title.type'
defaultMessage='choose a contract type'
key='type' />,
key='type'
/>,
<FormattedMessage
id='addContract.title.details'
defaultMessage='enter contract details'
key='details' />
key='details'
/>
] }
visible>
visible
>
{ this.renderStep() }
</Modal>
);
@ -98,9 +101,11 @@ class AddContract extends Component {
label={
<FormattedMessage
id='addContract.button.cancel'
defaultMessage='Cancel' />
defaultMessage='Cancel'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
if (step === 0) {
@ -112,9 +117,11 @@ class AddContract extends Component {
label={
<FormattedMessage
id='addContract.button.next'
defaultMessage='Next' />
defaultMessage='Next'
/>
}
onClick={ this.onNext } />
onClick={ this.onNext }
/>
];
}
@ -126,19 +133,23 @@ class AddContract extends Component {
label={
<FormattedMessage
id='addContract.button.prev'
defaultMessage='Back' />
defaultMessage='Back'
/>
}
onClick={ this.onPrev } />,
onClick={ this.onPrev }
/>,
<Button
icon={ <AddIcon /> }
key='add'
label={
<FormattedMessage
id='addContract.button.add'
defaultMessage='Add Contract' />
defaultMessage='Add Contract'
/>
}
disabled={ this.store.hasError }
onClick={ this.onAdd } />
onClick={ this.onAdd }
/>
];
}
@ -152,58 +163,70 @@ class AddContract extends Component {
hint={
<FormattedMessage
id='addContract.address.hint'
defaultMessage='the network address for the contract' />
defaultMessage='the network address for the contract'
/>
}
label={
<FormattedMessage
id='addContract.address.label'
defaultMessage='network address' />
defaultMessage='network address'
/>
}
onChange={ this.onChangeAddress }
onSubmit={ this.onEditAddress }
value={ address } />
value={ address }
/>
<Input
error={ nameError }
hint={
<FormattedMessage
id='addContract.name.hint'
defaultMessage='a descriptive name for the contract' />
defaultMessage='a descriptive name for the contract'
/>
}
label={
<FormattedMessage
id='addContract.name.label'
defaultMessage='contract name' />
defaultMessage='contract name'
/>
}
onSubmit={ this.onEditName }
value={ name } />
value={ name }
/>
<Input
hint={
<FormattedMessage
id='addContract.description.hint'
defaultMessage='an expanded description for the entry' />
defaultMessage='an expanded description for the entry'
/>
}
label={
<FormattedMessage
id='addContract.description.label'
defaultMessage='(optional) contract description' />
defaultMessage='(optional) contract description'
/>
}
onSubmit={ this.onEditDescription }
value={ description } />
value={ description }
/>
<Input
error={ abiError }
hint={
<FormattedMessage
id='addContract.abi.hint'
defaultMessage='the abi for the contract' />
defaultMessage='the abi for the contract'
/>
}
label={
<FormattedMessage
id='addContract.abi.label'
defaultMessage='contract abi' />
defaultMessage='contract abi'
/>
}
onSubmit={ this.onEditAbi }
readOnly={ abiType.readOnly }
value={ abi } />
value={ abi }
/>
</Form>
);
}

View File

@ -37,7 +37,8 @@ function render (props = {}) {
<AddContract
{ ...props }
contracts={ CONTRACTS }
onClose={ onClose } />,
onClose={ onClose }
/>,
{ context: { store: reduxStore } }
).find('AddContract').shallow({ context: { api } });
instance = component.instance();

View File

@ -30,15 +30,18 @@ const ABI_TYPES = [
<a href='https://github.com/ethereum/EIPs/issues/20' target='_blank'>
<FormattedMessage
id='addContract.abiType.token.erc20'
defaultMessage='ERC 20' />
defaultMessage='ERC 20'
/>
</a>
)
} } />
} }
/>
),
label: (
<FormattedMessage
id='addContract.abiType.token.label'
defaultMessage='Token' />
defaultMessage='Token'
/>
),
readOnly: true,
type: 'token',
@ -54,15 +57,18 @@ const ABI_TYPES = [
<a href='https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol' target='_blank'>
<FormattedMessage
id='addContract.abiType.multisigWallet.link'
defaultMessage='see contract code' />
defaultMessage='see contract code'
/>
</a>
)
} } />
} }
/>
),
label: (
<FormattedMessage
id='addContract.abiType.multisigWallet.label'
defaultMessage='Multisig Wallet' />
defaultMessage='Multisig Wallet'
/>
),
readOnly: true,
type: 'multisig',
@ -72,12 +78,14 @@ const ABI_TYPES = [
description: (
<FormattedMessage
id='addContract.abiType.custom.description'
defaultMessage='Contract created from custom ABI' />
defaultMessage='Contract created from custom ABI'
/>
),
label: (
<FormattedMessage
id='addContract.abiType.custom.label'
defaultMessage='Custom Contract' />
defaultMessage='Custom Contract'
/>
),
type: 'custom',
value: ''

View File

@ -47,46 +47,56 @@ export default class AddDapps extends Component {
label={
<FormattedMessage
id='dapps.add.button.done'
defaultMessage='Done' />
defaultMessage='Done'
/>
}
onClick={ store.closeModal } />
onClick={ store.closeModal }
/>
] }
compact
title={
<FormattedMessage
id='dapps.add.label'
defaultMessage='visible applications' />
defaultMessage='visible applications'
/>
}
visible>
visible
>
<div className={ styles.warning } />
{
this.renderList(store.sortedLocal,
<FormattedMessage
id='dapps.add.local.label'
defaultMessage='Applications locally available' />,
defaultMessage='Applications locally available'
/>,
<FormattedMessage
id='dapps.add.local.desc'
defaultMessage='All applications installed locally on the machine by the user for access by the Parity client.' />
defaultMessage='All applications installed locally on the machine by the user for access by the Parity client.'
/>
)
}
{
this.renderList(store.sortedBuiltin,
<FormattedMessage
id='dapps.add.builtin.label'
defaultMessage='Applications bundled with Parity' />,
defaultMessage='Applications bundled with Parity'
/>,
<FormattedMessage
id='dapps.add.builtin.desc'
defaultMessage='Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.' />
defaultMessage='Experimental applications developed by the Parity team to show off dapp capabilities, integration, experimental features and to control certain network-wide client behaviour.'
/>
)
}
{
this.renderList(store.sortedNetwork,
<FormattedMessage
id='dapps.add.network.label'
defaultMessage='Applications on the global network' />,
defaultMessage='Applications on the global network'
/>,
<FormattedMessage
id='dapps.add.network.desc'
defaultMessage='These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.' />
defaultMessage='These applications are not affiliated with Parity nor are they published by Parity. Each remain under the control of their respective authors. Please ensure that you understand the goals for each application before interacting.'
/>
)
}
</Modal>

View File

@ -35,12 +35,14 @@ export default class AccountDetails extends Component {
allowCopy
hint='a descriptive name for the account'
label='account name'
value={ name } />
value={ name }
/>
<InputAddress
disabled
hint='the network address for the account'
label='address'
value={ address } />
value={ address }
/>
{ this.renderPhrase() }
</Form>
);
@ -59,7 +61,8 @@ export default class AccountDetails extends Component {
allowCopy
hint='the account recovery phrase'
label='owner recovery phrase (keep private and secure, it allows full and unlimited access to the account)'
value={ phrase } />
value={ phrase }
/>
);
}
}

View File

@ -34,25 +34,32 @@ export default class CreationType extends Component {
<RadioButtonGroup
defaultSelected='fromNew'
name='creationType'
onChange={ this.onChange }>
onChange={ this.onChange }
>
<RadioButton
label='Create new account manually'
value='fromNew' />
value='fromNew'
/>
<RadioButton
label='Recover account from recovery phrase'
value='fromPhrase' />
value='fromPhrase'
/>
<RadioButton
label='Import accounts from Geth keystore'
value='fromGeth' />
value='fromGeth'
/>
<RadioButton
label='Import account from a backup JSON file'
value='fromJSON' />
value='fromJSON'
/>
<RadioButton
label='Import account from an Ethereum pre-sale wallet'
value='fromPresale' />
value='fromPresale'
/>
<RadioButton
label='Import raw private key'
value='fromRaw' />
value='fromRaw'
/>
</RadioButtonGroup>
</div>
);

View File

@ -64,12 +64,14 @@ export default class CreateAccount extends Component {
hint='a descriptive name for the account'
error={ accountNameError }
value={ accountName }
onChange={ this.onEditAccountName } />
onChange={ this.onEditAccountName }
/>
<Input
label='password hint'
hint='(optional) a hint to help with remembering the password'
value={ passwordHint }
onChange={ this.onEditPasswordHint } />
onChange={ this.onEditPasswordHint }
/>
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
@ -78,7 +80,8 @@ export default class CreateAccount extends Component {
type='password'
error={ password1Error }
value={ password1 }
onChange={ this.onEditPassword1 } />
onChange={ this.onEditPassword1 }
/>
</div>
<div className={ styles.password }>
<Input
@ -87,7 +90,8 @@ export default class CreateAccount extends Component {
type='password'
error={ password2Error }
value={ password2 }
onChange={ this.onEditPassword2 } />
onChange={ this.onEditPassword2 }
/>
</div>
</div>
{ this.renderIdentitySelector() }
@ -108,7 +112,8 @@ export default class CreateAccount extends Component {
<RadioButton
className={ styles.button }
key={ address }
value={ address } />
value={ address }
/>
);
});
@ -117,7 +122,8 @@ export default class CreateAccount extends Component {
valueSelected={ selectedAddress }
className={ styles.selector }
name='identitySelector'
onChange={ this.onChangeIdentity }>
onChange={ this.onChangeIdentity }
>
{ buttons }
</RadioButtonGroup>
);
@ -135,10 +141,12 @@ export default class CreateAccount extends Component {
<div
className={ styles.identity }
key={ address }
onTouchTap={ this.onChangeIdentity }>
onTouchTap={ this.onChangeIdentity }
>
<IdentityIcon
address={ address }
center />
center
/>
</div>
);
});
@ -148,9 +156,11 @@ export default class CreateAccount extends Component {
{ identities }
<div className={ styles.refresh }>
<IconButton
onTouchTap={ this.createIdentities }>
onTouchTap={ this.createIdentities }
>
<ActionAutorenew
color='rgb(0, 151, 167)' />
color='rgb(0, 151, 167)'
/>
</IconButton>
</div>
</div>

View File

@ -54,7 +54,8 @@ export default class NewGeth extends Component {
<div className={ styles.icon }>
<IdentityIcon
center inline
address={ account.address } />
address={ account.address }
/>
</div>
<div className={ styles.detail }>
<div className={ styles.address }>{ account.address }</div>
@ -69,7 +70,8 @@ export default class NewGeth extends Component {
checked={ account.checked }
label={ label }
data-address={ account.address }
onCheck={ this.onSelect } />
onCheck={ this.onSelect }
/>
);
});

View File

@ -59,12 +59,14 @@ export default class NewImport extends Component {
hint='a descriptive name for the account'
error={ this.state.accountNameError }
value={ this.state.accountName }
onChange={ this.onEditAccountName } />
onChange={ this.onEditAccountName }
/>
<Input
label='password hint'
hint='(optional) a hint to help with remembering the password'
value={ this.state.passwordHint }
onChange={ this.onEditpasswordHint } />
onChange={ this.onEditpasswordHint }
/>
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
@ -73,7 +75,8 @@ export default class NewImport extends Component {
type='password'
error={ this.state.passwordError }
value={ this.state.password }
onChange={ this.onEditPassword } />
onChange={ this.onEditPassword }
/>
</div>
</div>
<div>
@ -82,18 +85,21 @@ export default class NewImport extends Component {
label='wallet file'
hint='the wallet file for import'
error={ this.state.walletFileError }
value={ this.state.walletFile } />
value={ this.state.walletFile }
/>
<div className={ styles.upload }>
<FloatingActionButton
mini
onTouchTap={ this.openFileDialog }>
onTouchTap={ this.openFileDialog }
>
<EditorAttachFile />
</FloatingActionButton>
<input
ref='fileUpload'
type='file'
style={ STYLE_HIDDEN }
onChange={ this.onFileChange } />
onChange={ this.onFileChange }
/>
</div>
</div>
</Form>

View File

@ -60,18 +60,21 @@ export default class RawKey extends Component {
label='private key'
error={ rawKeyError }
value={ rawKey }
onChange={ this.onEditKey } />
onChange={ this.onEditKey }
/>
<Input
label='account name'
hint='a descriptive name for the account'
error={ accountNameError }
value={ accountName }
onChange={ this.onEditAccountName } />
onChange={ this.onEditAccountName }
/>
<Input
label='password hint'
hint='(optional) a hint to help with remembering the password'
value={ passwordHint }
onChange={ this.onEditPasswordHint } />
onChange={ this.onEditPasswordHint }
/>
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
@ -80,7 +83,8 @@ export default class RawKey extends Component {
type='password'
error={ password1Error }
value={ password1 }
onChange={ this.onEditPassword1 } />
onChange={ this.onEditPassword1 }
/>
</div>
<div className={ styles.password }>
<Input
@ -89,7 +93,8 @@ export default class RawKey extends Component {
type='password'
error={ password2Error }
value={ password2 }
onChange={ this.onEditPassword2 } />
onChange={ this.onEditPassword2 }
/>
</div>
</div>
</Form>

View File

@ -57,18 +57,21 @@ export default class RecoveryPhrase extends Component {
hint='the account recovery phrase'
label='account recovery phrase'
value={ recoveryPhrase }
onChange={ this.onEditPhrase } />
onChange={ this.onEditPhrase }
/>
<Input
label='account name'
hint='a descriptive name for the account'
error={ accountNameError }
value={ accountName }
onChange={ this.onEditAccountName } />
onChange={ this.onEditAccountName }
/>
<Input
label='password hint'
hint='(optional) a hint to help with remembering the password'
value={ passwordHint }
onChange={ this.onEditPasswordHint } />
onChange={ this.onEditPasswordHint }
/>
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
@ -77,7 +80,8 @@ export default class RecoveryPhrase extends Component {
type='password'
error={ password1Error }
value={ password1 }
onChange={ this.onEditPassword1 } />
onChange={ this.onEditPassword1 }
/>
</div>
<div className={ styles.password }>
<Input
@ -86,7 +90,8 @@ export default class RecoveryPhrase extends Component {
type='password'
error={ password2Error }
value={ password2 }
onChange={ this.onEditPassword2 } />
onChange={ this.onEditPassword2 }
/>
</div>
</div>
<Checkbox

View File

@ -87,7 +87,8 @@ export default class CreateAccount extends Component {
visible
actions={ this.renderDialogActions() }
current={ stage }
steps={ steps }>
steps={ steps }
>
{ this.renderWarning() }
{ this.renderPage() }
</Modal>
@ -162,11 +163,13 @@ export default class CreateAccount extends Component {
<Button
icon={ <ContentClear /> }
label='Cancel'
onClick={ this.onClose } />,
onClick={ this.onClose }
/>,
<Button
icon={ <NavigationArrowForward /> }
label='Next'
onClick={ this.onNext } />
onClick={ this.onNext }
/>
];
case 1:
const createLabel = createType === 'fromNew'
@ -177,16 +180,19 @@ export default class CreateAccount extends Component {
<Button
icon={ <ContentClear /> }
label='Cancel'
onClick={ this.onClose } />,
onClick={ this.onClose }
/>,
<Button
icon={ <NavigationArrowBack /> }
label='Back'
onClick={ this.onPrev } />,
onClick={ this.onPrev }
/>,
<Button
icon={ <ActionDone /> }
label={ createLabel }
disabled={ !this.state.canCreate }
onClick={ this.onCreate } />
onClick={ this.onCreate }
/>
];
case 2:
@ -195,12 +201,14 @@ export default class CreateAccount extends Component {
<Button
icon={ <PrintIcon /> }
label='Print Phrase'
onClick={ this.printPhrase } />
onClick={ this.printPhrase }
/>
) : null,
<Button
icon={ <ActionDoneAll /> }
label='Close'
onClick={ this.onClose } />
onClick={ this.onClose }
/>
];
}
}

View File

@ -21,30 +21,35 @@ export default {
noFile: (
<FormattedMessage
id='createAccount.error.noFile'
defaultMessage='select a valid wallet file to import' />
defaultMessage='select a valid wallet file to import'
/>
),
noKey: (
<FormattedMessage
id='createAccount.error.noKey'
defaultMessage='you need to provide the raw private key' />
defaultMessage='you need to provide the raw private key'
/>
),
noMatchPassword: (
<FormattedMessage
id='createAccount.error.noMatchPassword'
defaultMessage='the supplied passwords does not match' />
defaultMessage='the supplied passwords does not match'
/>
),
noName: (
<FormattedMessage
id='createAccount.error.noName'
defaultMessage='you need to specify a valid name for the account' />
defaultMessage='you need to specify a valid name for the account'
/>
),
invalidKey: (
<FormattedMessage
id='createAccount.error.invalidKey'
defaultMessage='the raw key needs to be hex, 64 characters in length and contain the prefix "0x"' />
defaultMessage='the raw key needs to be hex, 64 characters in length and contain the prefix "0x"'
/>
)
};

View File

@ -204,7 +204,6 @@ export default class CreateWallet extends Component {
default:
case 'TYPE':
return [ cancelBtn, nextBtn ];
}
}

View File

@ -47,17 +47,21 @@ export default class DappPermissions extends Component {
label={
<FormattedMessage
id='dapps.permissions.button.done'
defaultMessage='Done' />
defaultMessage='Done'
/>
}
onClick={ store.closeModal } />
onClick={ store.closeModal }
/>
] }
compact
title={
<FormattedMessage
id='dapps.permissions.label'
defaultMessage='visible dapp accounts' />
defaultMessage='visible dapp accounts'
/>
}
visible>
visible
>
<List>
{ this.renderListItems() }
</List>
@ -105,7 +109,8 @@ export default class DappPermissions extends Component {
</div>
</div>
</div>
} />
}
/>
);
});
}

View File

@ -49,14 +49,16 @@ class DeleteAccount extends Component {
title='confirm removal'
visible
onDeny={ this.closeDeleteDialog }
onConfirm={ this.onDeleteConfirmed }>
onConfirm={ this.onDeleteConfirmed }
>
<div className={ styles.hero }>
Are you sure you want to permanently delete the following account?
</div>
<div className={ styles.info }>
<IdentityIcon
className={ styles.icon }
address={ account.address } />
address={ account.address }
/>
<div className={ styles.nameinfo }>
<div className={ styles.header }>
<IdentityName address={ account.address } unknown />
@ -75,7 +77,8 @@ class DeleteAccount extends Component {
hint='provide the account password to confirm the account deletion'
type='password'
value={ password }
onChange={ this.onChangePassword } />
onChange={ this.onChangePassword }
/>
</div>
</ConfirmDialog>
);

View File

@ -99,12 +99,14 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='deployContract.details.address.hint'
defaultMessage='the owner account for this contract' />
defaultMessage='the owner account for this contract'
/>
}
label={
<FormattedMessage
id='deployContract.details.address.label'
defaultMessage='from account (contract owner)' />
defaultMessage='from account (contract owner)'
/>
}
onChange={ this.onFromAddressChange }
value={ fromAddress }
@ -115,12 +117,14 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='deployContract.details.name.hint'
defaultMessage='a name for the deployed contract' />
defaultMessage='a name for the deployed contract'
/>
}
label={
<FormattedMessage
id='deployContract.details.name.label'
defaultMessage='contract name' />
defaultMessage='contract name'
/>
}
onChange={ this.onNameChange }
value={ name || '' }
@ -131,12 +135,14 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='deployContract.details.description.hint'
defaultMessage='a description for the contract' />
defaultMessage='a description for the contract'
/>
}
label={
<FormattedMessage
id='deployContract.details.description.label'
defaultMessage='contract description (optional)' />
defaultMessage='contract description (optional)'
/>
}
onChange={ this.onDescriptionChange }
value={ description }
@ -149,12 +155,14 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='deployContract.details.abi.hint'
defaultMessage='the abi of the contract to deploy or solc combined-output' />
defaultMessage='the abi of the contract to deploy or solc combined-output'
/>
}
label={
<FormattedMessage
id='deployContract.details.abi.label'
defaultMessage='abi / solc combined-output' />
defaultMessage='abi / solc combined-output'
/>
}
onChange={ this.onSolcChange }
onSubmit={ this.onSolcSubmit }
@ -166,12 +174,14 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='deployContract.details.code.hint'
defaultMessage='the compiled code of the contract to deploy' />
defaultMessage='the compiled code of the contract to deploy'
/>
}
label={
<FormattedMessage
id='deployContract.details.code.label'
defaultMessage='code' />
defaultMessage='code'
/>
}
onSubmit={ this.onCodeChange }
readOnly={ readOnly || solc }
@ -196,7 +206,8 @@ export default class DetailsStep extends Component {
<MenuItem
key={ index }
label={ name }
value={ index }>
value={ index }
>
{ name }
</MenuItem>
));
@ -206,10 +217,12 @@ export default class DetailsStep extends Component {
label={
<FormattedMessage
id='deployContract.details.contract.label'
defaultMessage='select a contract' />
defaultMessage='select a contract'
/>
}
onChange={ this.onContractChange }
value={ selectedContractIndex }>
value={ selectedContractIndex }
>
{ contractsItems }
</Select>
);

View File

@ -84,7 +84,8 @@ export default class ParametersStep extends Component {
label={ label }
onChange={ onChange }
param={ param }
value={ value } />
value={ value }
/>
</div>
);
});
@ -94,7 +95,8 @@ export default class ParametersStep extends Component {
<p>
<FormattedMessage
id='deployContract.parameters.choose'
defaultMessage='Choose the contract parameters' />
defaultMessage='Choose the contract parameters'
/>
</p>
{ inputsComponents }
</div>

View File

@ -37,14 +37,16 @@ const STEPS = {
title: (
<FormattedMessage
id='deployContract.title.details'
defaultMessage='contract details' />
defaultMessage='contract details'
/>
)
},
CONTRACT_PARAMETERS: {
title: (
<FormattedMessage
id='deployContract.title.parameters'
defaultMessage='contract parameters' />
defaultMessage='contract parameters'
/>
)
},
DEPLOYMENT: {
@ -52,14 +54,16 @@ const STEPS = {
title: (
<FormattedMessage
id='deployContract.title.deployment'
defaultMessage='deployment' />
defaultMessage='deployment'
/>
)
},
COMPLETED: {
title: (
<FormattedMessage
id='deployContract.title.completed'
defaultMessage='completed' />
defaultMessage='completed'
/>
)
}
};
@ -149,10 +153,12 @@ class DeployContract extends Component {
: (deployError
? <FormattedMessage
id='deployContract.title.failed'
defaultMessage='deployment failed' />
defaultMessage='deployment failed'
/>
: <FormattedMessage
id='deployContract.title.rejected'
defaultMessage='rejected' />
defaultMessage='rejected'
/>
);
const waiting = realSteps
@ -170,7 +176,8 @@ class DeployContract extends Component {
}
title={ title }
visible
waiting={ waiting }>
waiting={ waiting }
>
{ this.renderExceptionWarning() }
{ this.renderStep() }
</Modal>
@ -188,7 +195,8 @@ class DeployContract extends Component {
return (
<Warning
warning={ errorEstimated } />
warning={ errorEstimated }
/>
);
}
@ -202,9 +210,11 @@ class DeployContract extends Component {
label={
<FormattedMessage
id='deployContract.button.cancel'
defaultMessage='Cancel' />
defaultMessage='Cancel'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
const closeBtn = (
@ -213,9 +223,11 @@ class DeployContract extends Component {
label={
<FormattedMessage
id='deployContract.button.close'
defaultMessage='Close' />
defaultMessage='Close'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
const closeBtnOk = (
@ -224,9 +236,11 @@ class DeployContract extends Component {
label={
<FormattedMessage
id='deployContract.button.done'
defaultMessage='Done' />
defaultMessage='Done'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
if (deployError) {
@ -242,14 +256,17 @@ class DeployContract extends Component {
icon={
<IdentityIcon
address={ fromAddress }
button />
button
/>
}
label={
<FormattedMessage
id='deployContract.button.next'
defaultMessage='Next' />
defaultMessage='Next'
/>
}
onClick={ this.onParametersStep } />
onClick={ this.onParametersStep }
/>
];
case 'CONTRACT_PARAMETERS':
@ -259,14 +276,17 @@ class DeployContract extends Component {
icon={
<IdentityIcon
address={ fromAddress }
button />
button
/>
}
label={
<FormattedMessage
id='deployContract.button.create'
defaultMessage='Create' />
defaultMessage='Create'
/>
}
onClick={ this.onDeployStart } />
onClick={ this.onDeployStart }
/>
];
case 'DEPLOYMENT':
@ -293,13 +313,16 @@ class DeployContract extends Component {
title={
<FormattedMessage
id='deployContract.rejected.title'
defaultMessage='The deployment has been rejected' />
defaultMessage='The deployment has been rejected'
/>
}
state={
<FormattedMessage
id='deployContract.rejected.description'
defaultMessage='You can safely close this window, the contract deployment will not occur.' />
} />
defaultMessage='You can safely close this window, the contract deployment will not occur.'
/>
}
/>
);
}
@ -340,9 +363,11 @@ class DeployContract extends Component {
title={
<FormattedMessage
id='deployContract.busy.title'
defaultMessage='The deployment is currently in progress' />
defaultMessage='The deployment is currently in progress'
/>
}
state={ deployState }>
state={ deployState }
>
{ body }
</BusyStep>
);
@ -353,7 +378,8 @@ class DeployContract extends Component {
<div>
<FormattedMessage
id='deployContract.completed.description'
defaultMessage='Your contract has been deployed at' />
defaultMessage='Your contract has been deployed at'
/>
</div>
<div>
<CopyToClipboard data={ address } />
@ -361,7 +387,8 @@ class DeployContract extends Component {
address={ address }
center
className={ styles.identityicon }
inline />
inline
/>
<div className={ styles.address }>
{ address }
</div>
@ -420,7 +447,8 @@ class DeployContract extends Component {
: (
<FormattedMessage
id='deployContract.owner.noneSelected'
defaultMessage='a valid account as the contract owner needs to be selected' />
defaultMessage='a valid account as the contract owner needs to be selected'
/>
);
this.setState({ fromAddress, fromAddressError }, this.estimateGas);
@ -510,7 +538,8 @@ class DeployContract extends Component {
deployState: (
<FormattedMessage
id='deployContract.state.preparing'
defaultMessage='Preparing transaction for network transmission' />
defaultMessage='Preparing transaction for network transmission'
/>
)
});
return;
@ -520,7 +549,8 @@ class DeployContract extends Component {
deployState: (
<FormattedMessage
id='deployContract.state.waitSigner'
defaultMessage='Waiting for confirmation of the transaction in the Parity Secure Signer' />
defaultMessage='Waiting for confirmation of the transaction in the Parity Secure Signer'
/>
)
});
return;
@ -531,7 +561,8 @@ class DeployContract extends Component {
deployState: (
<FormattedMessage
id='deployContract.state.waitReceipt'
defaultMessage='Waiting for the contract deployment transaction receipt' />
defaultMessage='Waiting for the contract deployment transaction receipt'
/>
)
});
return;
@ -542,7 +573,8 @@ class DeployContract extends Component {
deployState: (
<FormattedMessage
id='deployContract.state.validatingCode'
defaultMessage='Validating the deployed contract code' />
defaultMessage='Validating the deployed contract code'
/>
)
});
return;
@ -552,7 +584,8 @@ class DeployContract extends Component {
deployState: (
<FormattedMessage
id='deployContract.state.completed'
defaultMessage='The contract deployment has been completed' />
defaultMessage='The contract deployment has been completed'
/>
)
});
return;

View File

@ -41,7 +41,8 @@ function renderShallow () {
<DeployContract
accounts={ {} }
store={ STORE }
onClose={ sinon.stub() } />
onClose={ sinon.stub() }
/>
);
}

View File

@ -49,47 +49,57 @@ class EditMeta extends Component {
title={
<FormattedMessage
id='editMeta.title'
defaultMessage='edit metadata' />
defaultMessage='edit metadata'
/>
}
visible>
visible
>
<Form>
<Input
error={ nameError }
label={
<FormattedMessage
id='editMeta.name.label'
defaultMessage='name' />
defaultMessage='name'
/>
}
onSubmit={ this.store.setName }
value={ name } />
value={ name }
/>
<Input
hint={
<FormattedMessage
id='editMeta.description.hint'
defaultMessage='description for this address' />
defaultMessage='description for this address'
/>
}
label={
<FormattedMessage
id='editMeta.description.label'
defaultMessage='address description' />
defaultMessage='address description'
/>
}
value={ description }
onSubmit={ this.store.setDescription } />
onSubmit={ this.store.setDescription }
/>
{ this.renderAccountFields() }
<InputChip
addOnBlur
hint={
<FormattedMessage
id='editMeta.tags.hint'
defaultMessage='press <Enter> to add a tag' />
defaultMessage='press <Enter> to add a tag'
/>
}
label={
<FormattedMessage
id='editMeta.tags.label'
defaultMessage='(optional) tags' />
defaultMessage='(optional) tags'
/>
}
onTokensChange={ this.store.setTags }
tokens={ tags.slice() } />
tokens={ tags.slice() }
/>
</Form>
</Modal>
);
@ -102,12 +112,14 @@ class EditMeta extends Component {
<Button
label='Cancel'
icon={ <CancelIcon /> }
onClick={ this.props.onClose } />,
onClick={ this.props.onClose }
/>,
<Button
disabled={ hasError }
label='Save'
icon={ <SaveIcon /> }
onClick={ this.onSave } />
onClick={ this.onSave }
/>
];
}
@ -123,15 +135,18 @@ class EditMeta extends Component {
hint={
<FormattedMessage
id='editMeta.passwordHint.hint'
defaultMessage='a hint to allow password recovery' />
defaultMessage='a hint to allow password recovery'
/>
}
label={
<FormattedMessage
id='editMeta.passwordHint.label'
defaultMessage='(optional) password hint' />
defaultMessage='(optional) password hint'
/>
}
value={ passwordHint }
onSubmit={ this.store.setPasswordHint } />
onSubmit={ this.store.setPasswordHint }
/>
);
}

View File

@ -37,7 +37,8 @@ function render (props) {
<EditMeta
{ ...props }
account={ ACCOUNT }
onClose={ onClose } />,
onClose={ onClose }
/>,
{ context: { store: reduxStore } }
).find('EditMeta').shallow({ context: { api } });
instance = component.instance();

View File

@ -39,15 +39,18 @@ export default class AdvancedStep extends Component {
hint={
<FormattedMessage
id='executeContract.advanced.minBlock.hint'
defaultMessage='Only post the transaction after this block' />
defaultMessage='Only post the transaction after this block'
/>
}
label={
<FormattedMessage
id='executeContract.advanced.minBlock.label'
defaultMessage='BlockNumber to send from' />
defaultMessage='BlockNumber to send from'
/>
}
value={ minBlock }
onSubmit={ onMinBlockChange } />
onSubmit={ onMinBlockChange }
/>
<div className={ styles.gaseditor }>
<GasPriceEditor store={ gasStore } />
</div>

View File

@ -62,15 +62,18 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='executeContract.details.address.label'
defaultMessage='the account to transact with' />
defaultMessage='the account to transact with'
/>
}
label={
<FormattedMessage
id='executeContract.details.address.hint'
defaultMessage='from account' />
defaultMessage='from account'
/>
}
onChange={ onFromAddressChange }
value={ fromAddress } />
value={ fromAddress }
/>
{ this.renderFunctionSelect() }
{ this.renderParameters() }
<div className={ styles.columns }>
@ -80,15 +83,18 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='executeContract.details.amount.hint'
defaultMessage='the amount to send to with the transaction' />
defaultMessage='the amount to send to with the transaction'
/>
}
label={
<FormattedMessage
id='executeContract.details.amount.label'
defaultMessage='transaction value (in ETH)' />
defaultMessage='transaction value (in ETH)'
/>
}
onSubmit={ onAmountChange }
value={ amount } />
value={ amount }
/>
</div>
<div>
<Checkbox
@ -96,10 +102,12 @@ export default class DetailsStep extends Component {
label={
<FormattedMessage
id='executeContract.details.advancedCheck.label'
defaultMessage='advanced sending options' />
defaultMessage='advanced sending options'
/>
}
onCheck={ onAdvancedClick }
style={ CHECK_STYLE } />
style={ CHECK_STYLE }
/>
</div>
</div>
</Form>
@ -140,7 +148,8 @@ export default class DetailsStep extends Component {
<MenuItem
key={ func.signature }
value={ func.signature }
label={ func.name || '()' }>
label={ func.name || '()' }
>
{ name }
</MenuItem>
);
@ -152,15 +161,18 @@ export default class DetailsStep extends Component {
hint={
<FormattedMessage
id='executeContract.details.function.hint'
defaultMessage='the function to call on the contract' />
defaultMessage='the function to call on the contract'
/>
}
label={
<FormattedMessage
id='executeContract.details.function.label'
defaultMessage='function to execute' />
defaultMessage='function to execute'
/>
}
onChange={ this.onFuncChange }
value={ func.signature }>
value={ func.signature }
>
{ functions }
</Select>
);

View File

@ -47,7 +47,8 @@ function render (props) {
onFromAddressChange={ onFromAddressChange }
onFuncChange={ onFuncChange }
onGasEditClick={ onGasEditClick }
onValueChange={ onValueChange } />
onValueChange={ onValueChange }
/>
);
return component;

View File

@ -41,27 +41,32 @@ const TITLES = {
transfer: (
<FormattedMessage
id='executeContract.steps.transfer'
defaultMessage='function details' />
defaultMessage='function details'
/>
),
sending: (
<FormattedMessage
id='executeContract.steps.sending'
defaultMessage='sending' />
defaultMessage='sending'
/>
),
complete: (
<FormattedMessage
id='executeContract.steps.complete'
defaultMessage='complete' />
defaultMessage='complete'
/>
),
advanced: (
<FormattedMessage
id='executeContract.steps.advanced'
defaultMessage='advanced options' />
defaultMessage='advanced options'
/>
),
rejected: (
<FormattedMessage
id='executeContract.steps.rejected'
defaultMessage='rejected' />
defaultMessage='rejected'
/>
)
};
const STAGES_BASIC = [TITLES.transfer, TITLES.sending, TITLES.complete];
@ -139,7 +144,8 @@ class ExecuteContract extends Component {
advancedOptions
? [STEP_BUSY]
: [STEP_BUSY_OR_ADVANCED]
}>
}
>
{ this.renderExceptionWarning() }
{ this.renderStep() }
</Modal>
@ -170,10 +176,12 @@ class ExecuteContract extends Component {
label={
<FormattedMessage
id='executeContract.button.cancel'
defaultMessage='cancel' />
defaultMessage='cancel'
/>
}
icon={ <CancelIcon /> }
onClick={ onClose } />
onClick={ onClose }
/>
);
const postBtn = (
<Button
@ -181,11 +189,13 @@ class ExecuteContract extends Component {
label={
<FormattedMessage
id='executeContract.button.post'
defaultMessage='post transaction' />
defaultMessage='post transaction'
/>
}
disabled={ !!(sending || hasError) }
icon={ <IdentityIcon address={ fromAddress } button /> }
onClick={ this.postTransaction } />
onClick={ this.postTransaction }
/>
);
const nextBtn = (
<Button
@ -193,10 +203,12 @@ class ExecuteContract extends Component {
label={
<FormattedMessage
id='executeContract.button.next'
defaultMessage='next' />
defaultMessage='next'
/>
}
icon={ <NextIcon /> }
onClick={ this.onNextClick } />
onClick={ this.onNextClick }
/>
);
const prevBtn = (
<Button
@ -204,10 +216,12 @@ class ExecuteContract extends Component {
label={
<FormattedMessage
id='executeContract.button.prev'
defaultMessage='prev' />
defaultMessage='prev'
/>
}
icon={ <PrevIcon /> }
onClick={ this.onPrevClick } />
onClick={ this.onPrevClick }
/>
);
if (step === STEP_DETAILS) {
@ -233,10 +247,12 @@ class ExecuteContract extends Component {
label={
<FormattedMessage
id='executeContract.button.done'
defaultMessage='done' />
defaultMessage='done'
/>
}
icon={ <DoneIcon /> }
onClick={ onClose } />
onClick={ onClose }
/>
];
}
@ -250,13 +266,16 @@ class ExecuteContract extends Component {
title={
<FormattedMessage
id='executeContract.rejected.title'
defaultMessage='The execution has been rejected' />
defaultMessage='The execution has been rejected'
/>
}
state={
<FormattedMessage
id='executeContract.rejected.state'
defaultMessage='You can safely close this window, the function execution will not occur.' />
} />
defaultMessage='You can safely close this window, the function execution will not occur.'
/>
}
/>
);
}
@ -269,7 +288,8 @@ class ExecuteContract extends Component {
onFromAddressChange={ onFromAddressChange }
onFuncChange={ this.onFuncChange }
onAdvancedClick={ this.onAdvancedClick }
onValueChange={ this.onValueChange } />
onValueChange={ this.onValueChange }
/>
);
} else if (step === (advancedOptions ? STEP_BUSY : STEP_BUSY_OR_ADVANCED)) {
return (
@ -277,9 +297,11 @@ class ExecuteContract extends Component {
title={
<FormattedMessage
id='executeContract.busy.title'
defaultMessage='The function execution is in progress' />
defaultMessage='The function execution is in progress'
/>
}
state={ busyState } />
state={ busyState }
/>
);
} else if (advancedOptions && (step === STEP_BUSY_OR_ADVANCED)) {
return (
@ -287,7 +309,8 @@ class ExecuteContract extends Component {
gasStore={ this.gasStore }
minBlock={ minBlock }
minBlockError={ minBlockError }
onMinBlockChange={ this.onMinBlockChange } />
onMinBlockChange={ this.onMinBlockChange }
/>
);
}
@ -406,7 +429,8 @@ class ExecuteContract extends Component {
busyState: (
<FormattedMessage
id='executeContract.busy.waitAuth'
defaultMessage='Waiting for authorization in the Parity Signer' />
defaultMessage='Waiting for authorization in the Parity Signer'
/>
)
});
@ -429,7 +453,8 @@ class ExecuteContract extends Component {
busyState: (
<FormattedMessage
id='executeContract.busy.posted'
defaultMessage='Your transaction has been posted to the network' />
defaultMessage='Your transaction has been posted to the network'
/>
)
});
})

View File

@ -35,7 +35,8 @@ function render (props) {
{ ...props }
contract={ CONTRACT }
onClose={ onClose }
onFromAddressChange={ onFromAddressChange } />,
onFromAddressChange={ onFromAddressChange }
/>,
{ context: { api: createApi(), store: STORE } }
).find('ExecuteContract').shallow();

View File

@ -167,7 +167,8 @@ export default class TnC extends Component {
className={ styles.accept }
label='I accept these terms and conditions'
checked={ hasAccepted }
onCheck={ onAccept } />
onCheck={ onAccept }
/>
</div>
);
}

View File

@ -32,7 +32,8 @@ export default class FirstRun extends Component {
<img
src={ imagesEthcore }
alt='Ethcore Ltd.'
style={ LOGO_STYLE } />
style={ LOGO_STYLE }
/>
<p>Welcome to <strong>Parity</strong>, the fastest and simplest way to run your node.</p>
<p>The next few steps will guide you through the process of setting up you Parity instance and the associated account.</p>
<p>Click <strong>Next</strong> to continue your journey.</p>

View File

@ -71,7 +71,8 @@ class FirstRun extends Component {
actions={ this.renderDialogActions() }
current={ stage }
steps={ STAGE_NAMES }
visible>
visible
>
{ this.renderStage() }
</Modal>
);
@ -89,19 +90,22 @@ class FirstRun extends Component {
return (
<TnC
hasAccepted={ hasAcceptedTnc }
onAccept={ this.onAcceptTnC } />
onAccept={ this.onAcceptTnC }
/>
);
case 2:
return (
<NewAccount
onChange={ this.onChangeDetails } />
onChange={ this.onChangeDetails }
/>
);
case 3:
return (
<AccountDetails
address={ address }
name={ name }
phrase={ phrase } />
phrase={ phrase }
/>
);
case 4:
return (
@ -120,7 +124,8 @@ class FirstRun extends Component {
<Button
icon={ <NavigationArrowForward /> }
label='Next'
onClick={ this.onNext } />
onClick={ this.onNext }
/>
);
case 1:
@ -129,7 +134,8 @@ class FirstRun extends Component {
disabled={ !hasAcceptedTnc }
icon={ <NavigationArrowForward /> }
label='Next'
onClick={ this.onNext } />
onClick={ this.onNext }
/>
);
case 2:
@ -173,7 +179,8 @@ class FirstRun extends Component {
<Button
icon={ <ActionDoneAll /> }
label='Close'
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
}
}

View File

@ -35,7 +35,6 @@ const SELECTED_STYLE = {
};
export default class LoadContract extends Component {
static propTypes = {
onClose: PropTypes.func.isRequired,
onLoad: PropTypes.func.isRequired,
@ -279,5 +278,4 @@ export default class LoadContract extends Component {
deleteId: -1
});
}
}

View File

@ -65,9 +65,11 @@ class PasswordManager extends Component {
title={
<FormattedMessage
id='passwordChange.title'
defaultMessage='Password Manager' />
defaultMessage='Password Manager'
/>
}
visible>
visible
>
{ this.renderAccount() }
{ this.renderPage() }
{ this.renderMessage() }
@ -90,7 +92,8 @@ class PasswordManager extends Component {
? MSG_SUCCESS_STYLE
: MSG_FAILURE_STYLE
}
zDepth={ 1 }>
zDepth={ 1 }
>
{ infoMessage.value }
</Paper>
);
@ -106,7 +109,8 @@ class PasswordManager extends Component {
<IdentityName
address={ address }
className={ styles.accountName }
unknown />
unknown
/>
<span className={ styles.accountAddress }>
{ address }
</span>
@ -125,14 +129,17 @@ class PasswordManager extends Component {
return (
<Tabs
inkBarStyle={ TABS_INKBAR_STYLE }
tabItemContainerStyle={ TABS_ITEM_STYLE }>
tabItemContainerStyle={ TABS_ITEM_STYLE }
>
<Tab
label={
<FormattedMessage
id='passwordChange.tabTest.label'
defaultMessage='Test Password' />
defaultMessage='Test Password'
/>
}
onActive={ this.onActivateTestTab }>
onActive={ this.onActivateTestTab }
>
<Form className={ styles.form }>
<div>
<Input
@ -140,17 +147,20 @@ class PasswordManager extends Component {
hint={
<FormattedMessage
id='passwordChange.testPassword.hint'
defaultMessage='your account password' />
defaultMessage='your account password'
/>
}
label={
<FormattedMessage
id='passwordChange.testPassword.label'
defaultMessage='password' />
defaultMessage='password'
/>
}
onChange={ this.onEditTestPassword }
onSubmit={ this.testPassword }
submitOnBlur={ false }
type='password' />
type='password'
/>
</div>
</Form>
</Tab>
@ -158,9 +168,11 @@ class PasswordManager extends Component {
label={
<FormattedMessage
id='passwordChange.tabChange.label'
defaultMessage='Change Password' />
defaultMessage='Change Password'
/>
}
onActive={ this.onActivateChangeTab }>
onActive={ this.onActivateChangeTab }
>
<Form className={ styles.form }>
<div>
<Input
@ -168,29 +180,35 @@ class PasswordManager extends Component {
hint={
<FormattedMessage
id='passwordChange.currentPassword.hint'
defaultMessage='your current password for this account' />
defaultMessage='your current password for this account'
/>
}
label={
<FormattedMessage
id='passwordChange.currentPassword.label'
defaultMessage='current password' />
defaultMessage='current password'
/>
}
onChange={ this.onEditCurrentPassword }
type='password' />
type='password'
/>
<Input
disabled={ busy }
hint={
<FormattedMessage
id='passwordChange.passwordHint.hint'
defaultMessage='hint for the new password' />
defaultMessage='hint for the new password'
/>
}
label={
<FormattedMessage
id='passwordChange.passwordHint.label'
defaultMessage='(optional) new password hint' />
defaultMessage='(optional) new password hint'
/>
}
onChange={ this.onEditNewPasswordHint }
value={ passwordHint } />
value={ passwordHint }
/>
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
@ -198,17 +216,20 @@ class PasswordManager extends Component {
hint={
<FormattedMessage
id='passwordChange.newPassword.hint'
defaultMessage='the new password for this account' />
defaultMessage='the new password for this account'
/>
}
label={
<FormattedMessage
id='passwordChange.newPassword.label'
defaultMessage='new password' />
defaultMessage='new password'
/>
}
onChange={ this.onEditNewPassword }
onSubmit={ this.changePassword }
submitOnBlur={ false }
type='password' />
type='password'
/>
</div>
<div className={ styles.password }>
<Input
@ -218,22 +239,26 @@ class PasswordManager extends Component {
? null
: <FormattedMessage
id='passwordChange.repeatPassword.error'
defaultMessage='the supplied passwords do not match' />
defaultMessage='the supplied passwords do not match'
/>
}
hint={
<FormattedMessage
id='passwordChange.repeatPassword.hint'
defaultMessage='repeat the new password for this account' />
defaultMessage='repeat the new password for this account'
/>
}
label={
<FormattedMessage
id='passwordChange.repeatPassword.label'
defaultMessage='repeat new password' />
defaultMessage='repeat new password'
/>
}
onChange={ this.onEditNewPasswordRepeat }
onSubmit={ this.changePassword }
submitOnBlur={ false }
type='password' />
type='password'
/>
</div>
</div>
@ -256,9 +281,11 @@ class PasswordManager extends Component {
label={
<FormattedMessage
id='passwordChange.button.cancel'
defaultMessage='Cancel' />
defaultMessage='Cancel'
/>
}
onClick={ onClose } />
onClick={ onClose }
/>
);
if (busy) {
@ -270,8 +297,10 @@ class PasswordManager extends Component {
label={
<FormattedMessage
id='passwordChange.button.wait'
defaultMessage='Wait...' />
} />
defaultMessage='Wait...'
/>
}
/>
];
}
@ -284,9 +313,11 @@ class PasswordManager extends Component {
label={
<FormattedMessage
id='passwordChange.button.test'
defaultMessage='Test' />
defaultMessage='Test'
/>
}
onClick={ this.testPassword } />
onClick={ this.testPassword }
/>
];
}
@ -299,9 +330,11 @@ class PasswordManager extends Component {
label={
<FormattedMessage
id='passwordChange.button.change'
defaultMessage='Change' />
defaultMessage='Change'
/>
}
onClick={ this.changePassword } />
onClick={ this.changePassword }
/>
];
}
@ -342,7 +375,8 @@ class PasswordManager extends Component {
<div>
<FormattedMessage
id='passwordChange.success'
defaultMessage='Your password has been successfully changed' />
defaultMessage='Your password has been successfully changed'
/>
</div>
);
this.props.onClose();

View File

@ -35,7 +35,8 @@ function render (props) {
<PasswordManager
{ ...props }
account={ ACCOUNT }
onClose={ onClose } />,
onClose={ onClose }
/>,
{ context: { store: reduxStore } }
).find('PasswordManager').shallow({ context: { api: createApi() } });
instance = component.instance();

View File

@ -25,7 +25,6 @@ import { ERRORS, validateName } from '~/util/validation';
import styles from './saveContract.css';
export default class SaveContract extends Component {
static propTypes = {
sourcecode: PropTypes.string.isRequired,
onClose: PropTypes.func.isRequired,
@ -105,5 +104,4 @@ export default class SaveContract extends Component {
const { name, nameError } = validateName(value);
this.setState({ name, nameError });
}
}

View File

@ -42,7 +42,8 @@ export default class AwaitingDepositStep extends Component {
<FormattedMessage
id='shapeshift.awaitingDepositStep.awaitingConfirmation'
defaultMessage='Awaiting confirmation of the deposit address for your {typeSymbol} funds exchange'
values={ { typeSymbol } } />
values={ { typeSymbol } }
/>
</div>
</div>
);
@ -57,7 +58,8 @@ export default class AwaitingDepositStep extends Component {
values={ {
shapeshiftLink: <a href='https://shapeshift.io' target='_blank'>ShapeShift.io</a>,
typeSymbol
} } />
} }
/>
</div>
<div className={ styles.hero }>
{ depositAddress }
@ -70,7 +72,8 @@ export default class AwaitingDepositStep extends Component {
values={ {
maximum: <Value amount={ price.limit } symbol={ coinSymbol } />,
minimum: <Value amount={ price.minimum } symbol={ coinSymbol } />
} } />
} }
/>
</div>
</div>
</div>

View File

@ -27,7 +27,8 @@ function render () {
store={ {
coinSymbol: 'BTC',
price: { rate: 0.001, minimum: 0, limit: 1.999 }
} } />
} }
/>
);
return component;

View File

@ -39,7 +39,8 @@ export default class AwaitingExchangeStep extends Component {
defaultMessage='{shapeshiftLink} has received a deposit of -'
values={ {
shapeshiftLink: <a href='https://shapeshift.io' target='_blank'>ShapeShift.io</a>
} } />
} }
/>
</div>
<div className={ styles.hero }>
<Value amount={ incomingCoin } symbol={ incomingType } />
@ -47,7 +48,8 @@ export default class AwaitingExchangeStep extends Component {
<div className={ styles.info }>
<FormattedMessage
id='shapeshift.awaitingExchangeStep.awaitingCompletion'
defaultMessage='Awaiting the completion of the funds exchange and transfer of funds to your Parity account.' />
defaultMessage='Awaiting the completion of the funds exchange and transfer of funds to your Parity account.'
/>
</div>
</div>
);

View File

@ -26,7 +26,8 @@ function render () {
<AwaitingExchangeStep
store={ {
depositInfo: { incomingCoin: 0.01, incomingType: 'BTC' }
} } />
} }
/>
);
return component;

View File

@ -40,7 +40,8 @@ export default class CompletedStep extends Component {
defaultMessage='{shapeshiftLink} has completed the funds exchange.'
values={ {
shapeshiftLink: <a href='https://shapeshift.io' target='_blank'>ShapeShift.io</a>
} } />
} }
/>
</div>
<div className={ styles.hero }>
<Value amount={ incomingCoin } symbol={ incomingType } /> => <Value amount={ outgoingCoin } symbol={ outgoingType } />
@ -48,7 +49,8 @@ export default class CompletedStep extends Component {
<div className={ styles.info }>
<FormattedMessage
id='shapeshift.completedStep.parityFunds'
defaultMessage='The change in funds will be reflected in your Parity account shortly.' />
defaultMessage='The change in funds will be reflected in your Parity account shortly.'
/>
</div>
</div>
);

View File

@ -27,7 +27,8 @@ function render () {
store={ {
depositInfo: { incomingCoin: 0.01, incomingType: 'BTC' },
exchangeInfo: { outgoingCoin: 0.1, outgoingType: 'ETH' }
} } />
} }
/>
);
return component;

View File

@ -37,7 +37,8 @@ export default class ErrorStep extends Component {
defaultMessage='The funds shifting via {shapeshiftLink} failed with a fatal error on the exchange. The error message received from the exchange is as follow:'
values={ {
shapeshiftLink: <a href='https://shapeshift.io' target='_blank'>ShapeShift.io</a>
} } />
} }
/>
</div>
<div className={ styles.error }>
{ error.message }

View File

@ -26,7 +26,8 @@ function render () {
<ErrorStep
store={ {
error: new Error('testing')
} } />
} }
/>
);
return component;

View File

@ -29,7 +29,8 @@ const WARNING_LABELS = {
[WARNING_NO_PRICE]: (
<FormattedMessage
id='shapeshift.warning.noPrice'
defaultMessage='No price match was found for the selected type' />
defaultMessage='No price match was found for the selected type'
/>
)
};
@ -47,7 +48,8 @@ export default class OptionsStep extends Component {
<div className={ styles.empty }>
<FormattedMessage
id='shapeshift.optionsStep.noPairs'
defaultMessage='There are currently no exchange pairs/coins available to fund with.' />
defaultMessage='There are currently no exchange pairs/coins available to fund with.'
/>
</div>
);
}
@ -60,15 +62,18 @@ export default class OptionsStep extends Component {
hint={
<FormattedMessage
id='shapeshift.optionsStep.typeSelect.hint'
defaultMessage='the type of crypto conversion to do' />
defaultMessage='the type of crypto conversion to do'
/>
}
label={
<FormattedMessage
id='shapeshift.optionsStep.typeSelect.label'
defaultMessage='fund account from' />
defaultMessage='fund account from'
/>
}
onChange={ this.onSelectCoin }
value={ coinSymbol }>
value={ coinSymbol }
>
{
coins.map(this.renderCoinSelectItem)
}
@ -77,30 +82,36 @@ export default class OptionsStep extends Component {
hint={
<FormattedMessage
id='shapeshift.optionsStep.returnAddr.hint'
defaultMessage='the return address for send failures' />
defaultMessage='the return address for send failures'
/>
}
label={
<FormattedMessage
id='shapeshift.optionsStep.returnAddr.label'
defaultMessage='(optional) {coinSymbol} return address'
values={ { coinSymbol } } />
values={ { coinSymbol } }
/>
}
onSubmit={ this.onChangeRefundAddress }
value={ refundAddress } />
value={ refundAddress }
/>
<Checkbox
checked={ hasAcceptedTerms }
className={ styles.accept }
label={
<FormattedMessage
id='shapeshift.optionsStep.terms.label'
defaultMessage='I understand that ShapeShift.io is a 3rd-party service and by using the service any transfer of information and/or funds is completely out of the control of Parity' />
defaultMessage='I understand that ShapeShift.io is a 3rd-party service and by using the service any transfer of information and/or funds is completely out of the control of Parity'
/>
}
onCheck={ this.onToggleAcceptTerms } />
onCheck={ this.onToggleAcceptTerms }
/>
</Form>
<Warning warning={ WARNING_LABELS[warning] } />
<Price
coinSymbol={ coinSymbol }
price={ price } />
price={ price }
/>
</div>
);
}
@ -112,7 +123,8 @@ export default class OptionsStep extends Component {
<div className={ styles.coinselect }>
<img
className={ styles.coinimage }
src={ image } />
src={ image }
/>
<div className={ styles.coindetails }>
<div className={ styles.coinsymbol }>
{ symbol }
@ -128,7 +140,8 @@ export default class OptionsStep extends Component {
<MenuItem
key={ symbol }
value={ symbol }
label={ item }>
label={ item }
>
{ item }
</MenuItem>
);

View File

@ -49,7 +49,8 @@ export default class Price extends Component {
values={ {
maximum: <Value amount={ price.limit } symbol={ coinSymbol } />,
minimum: <Value amount={ price.minimum } symbol={ coinSymbol } />
} } />
} }
/>
</div>
</div>
);

View File

@ -27,7 +27,8 @@ function render (props = {}) {
coinSymbol='BTC'
price={ { rate: 0.1, minimum: 0.1, limit: 0.9 } }
error={ new Error('testing') }
{ ...props } />
{ ...props }
/>
);
return component;

View File

@ -34,21 +34,26 @@ import styles from './shapeshift.css';
const STAGE_TITLES = [
<FormattedMessage
id='shapeshift.title.details'
defaultMessage='details' />,
defaultMessage='details'
/>,
<FormattedMessage
id='shapeshift.title.deposit'
defaultMessage='awaiting deposit' />,
defaultMessage='awaiting deposit'
/>,
<FormattedMessage
id='shapeshift.title.exchange'
defaultMessage='awaiting exchange' />,
defaultMessage='awaiting exchange'
/>,
<FormattedMessage
id='shapeshift.title.completed'
defaultMessage='completed' />
defaultMessage='completed'
/>
];
const ERROR_TITLE = (
<FormattedMessage
id='shapeshift.title.error'
defaultMessage='exchange failed' />
defaultMessage='exchange failed'
/>
);
@observer
@ -93,7 +98,8 @@ export default class Shapeshift extends Component {
waiting={ [
STAGE_WAIT_DEPOSIT,
STAGE_WAIT_EXCHANGE
] }>
] }
>
{ this.renderPage() }
</Modal>
);
@ -114,9 +120,11 @@ export default class Shapeshift extends Component {
label={
<FormattedMessage
id='shapeshift.button.cancel'
defaultMessage='Cancel' />
defaultMessage='Cancel'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
);
if (error) {
@ -136,14 +144,17 @@ export default class Shapeshift extends Component {
icon={
<IdentityIcon
address={ address }
button />
button
/>
}
label={
<FormattedMessage
id='shapeshift.button.shift'
defaultMessage='Shift Funds' />
defaultMessage='Shift Funds'
/>
}
onClick={ this.onShift } />
onClick={ this.onShift }
/>
];
case STAGE_WAIT_DEPOSIT:
@ -161,9 +172,11 @@ export default class Shapeshift extends Component {
label={
<FormattedMessage
id='shapeshift.button.done'
defaultMessage='Close' />
defaultMessage='Close'
/>
}
onClick={ this.onClose } />
onClick={ this.onClose }
/>
];
}
}

View File

@ -33,7 +33,8 @@ function render (props = {}) {
<Shapeshift
address={ ADDRESS }
onClose={ onClose }
{ ...props } />,
{ ...props }
/>,
{ context: { store: {} } }
);
instance = component.instance();

View File

@ -98,7 +98,8 @@ class TokenSelect extends Component {
<MenuItem
key={ token.tag }
value={ token.tag }
label={ label }>
label={ label }
>
{ label }
</MenuItem>
);
@ -169,14 +170,16 @@ export default class Details extends Component {
hint='the amount to transfer to the recipient'
value={ value }
error={ valueError }
onChange={ this.onEditValue } />
onChange={ this.onEditValue }
/>
</div>
<div>
<Checkbox
checked={ all }
label='full account balance'
onCheck={ this.onCheckAll }
style={ CHECK_STYLE } />
style={ CHECK_STYLE }
/>
</div>
</div>
<div className={ styles.columns }>
@ -184,7 +187,8 @@ export default class Details extends Component {
<Input
disabled
label='total transaction amount'
error={ totalError }>
error={ totalError }
>
<div className={ styles.inputoverride }>
{ total }<small> ETH</small>
</div>
@ -196,7 +200,8 @@ export default class Details extends Component {
checked={ extras }
label='advanced sending options'
onCheck={ this.onCheckExtras }
style={ CHECK_STYLE } />
style={ CHECK_STYLE }
/>
</div>
</div>
</Form>
@ -235,7 +240,8 @@ export default class Details extends Component {
hint='the recipient address'
error={ recipientError }
value={ recipient }
onChange={ this.onEditRecipient } />
onChange={ this.onEditRecipient }
/>
</div>
);
}

View File

@ -45,19 +45,23 @@ export default class Extras extends Component {
hint={
<FormattedMessage
id='transferModal.minBlock.hint'
defaultMessage='Only post the transaction after this block' />
defaultMessage='Only post the transaction after this block'
/>
}
label={
<FormattedMessage
id='transferModal.minBlock.label'
defaultMessage='BlockNumber to send from' />
defaultMessage='BlockNumber to send from'
/>
}
value={ minBlock }
onChange={ this.onEditMinBlock } />
onChange={ this.onEditMinBlock }
/>
<div className={ styles.gaseditor }>
<GasPriceEditor
store={ gasStore }
onChange={ onChange } />
onChange={ onChange }
/>
</div>
</Form>
);
@ -76,15 +80,18 @@ export default class Extras extends Component {
hint={
<FormattedMessage
id='transfer.advanced.data.hint'
defaultMessage='the data to pass through with the transaction' />
defaultMessage='the data to pass through with the transaction'
/>
}
label={
<FormattedMessage
id='transfer.advanced.data.label'
defaultMessage='transaction data' />
defaultMessage='transaction data'
/>
}
onChange={ this.onEditData }
value={ data } />
value={ data }
/>
);
}

View File

@ -86,8 +86,7 @@ class Transfer extends Component {
}
return (
<Warning
warning={ errorEstimated } />
<Warning warning={ errorEstimated } />
);
}
@ -100,7 +99,8 @@ class Transfer extends Component {
<IdentityIcon
address={ account.address }
center
inline />
inline
/>
</div>
<div className={ styles.hdrdetails }>
<div className={ styles.hdrname }>
@ -142,7 +142,8 @@ class Transfer extends Component {
return (
<BusyStep
title='The transaction is in progress'
state={ busyState } />
state={ busyState }
/>
);
}
@ -218,7 +219,8 @@ class Transfer extends Component {
minBlockError={ minBlockError }
onChange={ this.store.onUpdateDetails }
total={ total }
totalError={ totalError } />
totalError={ totalError }
/>
);
}
@ -230,33 +232,38 @@ class Transfer extends Component {
<Button
icon={ <CancelIcon /> }
label='Cancel'
onClick={ this.handleClose } />
onClick={ this.handleClose }
/>
);
const nextBtn = (
<Button
disabled={ !this.store.isValid }
icon={ <NextIcon /> }
label='Next'
onClick={ this.store.onNext } />
onClick={ this.store.onNext }
/>
);
const prevBtn = (
<Button
icon={ <PrevIcon /> }
label='Back'
onClick={ this.store.onPrev } />
onClick={ this.store.onPrev }
/>
);
const sendBtn = (
<Button
disabled={ !this.store.isValid || sending }
icon={ <IdentityIcon address={ account.address } button /> }
label='Send'
onClick={ this.store.onSend } />
onClick={ this.store.onSend }
/>
);
const doneBtn = (
<Button
icon={ <DoneIcon /> }
label='Close'
onClick={ this.handleClose } />
onClick={ this.handleClose }
/>
);
switch (stage) {

View File

@ -50,22 +50,27 @@ export default class UpgradeParity extends Component {
<FormattedMessage
id='upgradeParity.step.info'
key='info'
defaultMessage='upgrade available' />,
defaultMessage='upgrade available'
/>,
<FormattedMessage
key='updating'
id='upgradeParity.step.updating'
defaultMessage='upgrading parity' />,
defaultMessage='upgrading parity'
/>,
store.step === STEP_ERROR
? <FormattedMessage
id='upgradeParity.step.error'
key='error'
defaultMessage='error' />
defaultMessage='error'
/>
: <FormattedMessage
id='upgradeParity.step.completed'
key='completed'
defaultMessage='upgrade completed' />
defaultMessage='upgrade completed'
/>
] }
visible>
visible
>
{ this.renderStep() }
</Modal>
);
@ -81,9 +86,11 @@ export default class UpgradeParity extends Component {
label={
<FormattedMessage
id='upgradeParity.button.close'
defaultMessage='close' />
defaultMessage='close'
/>
}
onClick={ store.closeModal } />;
onClick={ store.closeModal }
/>;
const doneButton =
<Button
icon={ <DoneIcon /> }
@ -91,9 +98,11 @@ export default class UpgradeParity extends Component {
label={
<FormattedMessage
id='upgradeParity.button.done'
defaultMessage='done' />
defaultMessage='done'
/>
}
onClick={ store.closeModal } />;
onClick={ store.closeModal }
/>;
switch (store.step) {
case STEP_INFO:
@ -104,9 +113,11 @@ export default class UpgradeParity extends Component {
label={
<FormattedMessage
id='upgradeParity.button.upgrade'
defaultMessage='upgrade now' />
defaultMessage='upgrade now'
/>
}
onClick={ store.upgradeNow } />,
onClick={ store.upgradeNow }
/>,
closeButton
];
@ -142,7 +153,8 @@ export default class UpgradeParity extends Component {
values={ {
currentversion: <div className={ styles.version }>{ currentversion }</div>,
newversion: <div className={ styles.version }>{ newversion }</div>
} } />
} }
/>
</div>
{ this.renderConsensusInfo() }
</div>
@ -157,8 +169,10 @@ export default class UpgradeParity extends Component {
defaultMessage='Your upgrade to Parity {newversion} is currently in progress'
values={ {
newversion: <div className={ styles.version }>{ newversion }</div>
} } />
} />
} }
/>
}
/>
);
case STEP_COMPLETED:
@ -172,7 +186,8 @@ export default class UpgradeParity extends Component {
defaultMessage='Your upgrade to Parity {newversion} has failed with an error.'
values={ {
newversion: <div className={ styles.version }>{ newversion }</div>
} } />
} }
/>
</div>
<div className={ styles.error }>
{ store.error.message }
@ -188,7 +203,8 @@ export default class UpgradeParity extends Component {
defaultMessage='Your upgrade to Parity {newversion} has been successfully completed.'
values={ {
newversion: <div className={ styles.version }>{ newversion }</div>
} } />
} }
/>
</Completed>
);
}
@ -204,7 +220,8 @@ export default class UpgradeParity extends Component {
<div>
<FormattedMessage
id='upgradeParity.consensus.capable'
defaultMessage='Your current Parity version is capable of handling the network requirements.' />
defaultMessage='Your current Parity version is capable of handling the network requirements.'
/>
</div>
);
} else if (consensusCapability.capableUntil) {
@ -215,7 +232,8 @@ export default class UpgradeParity extends Component {
defaultMessage='Your current Parity version is capable of handling the network requirements until block {blockNumber}'
values={ {
blockNumber: consensusCapability.capableUntil
} } />
} }
/>
</div>
);
} else if (consensusCapability.incapableSince) {
@ -226,7 +244,8 @@ export default class UpgradeParity extends Component {
defaultMessage='Your current Parity version is incapable of handling the network requirements since block {blockNumber}'
values={ {
blockNumber: consensusCapability.incapableSince
} } />
} }
/>
</div>
);
}
@ -236,7 +255,8 @@ export default class UpgradeParity extends Component {
<div>
<FormattedMessage
id='upgradeParity.consensus.unknown'
defaultMessage='Your current Parity version is capable of handling the network requirements.' />
defaultMessage='Your current Parity version is capable of handling the network requirements.'
/>
</div>
);
}
@ -246,7 +266,8 @@ export default class UpgradeParity extends Component {
return (
<FormattedMessage
id='upgradeParity.version.unknown'
defaultMessage='unknown' />
defaultMessage='unknown'
/>
);
}

View File

@ -317,7 +317,6 @@ class WalletSettings extends Component {
default:
case 'TYPE':
return [ cancelBtn, nextBtn ];
}
}
}
@ -333,4 +332,7 @@ function mapStateToProps (initState, initProps) {
};
}
export default connect(mapStateToProps)(WalletSettings);
export default connect(
mapStateToProps,
null
)(WalletSettings);

View File

@ -26,7 +26,6 @@ import { fromWei } from '~/api/util/wei';
import styles from './accountCard.css';
export default class AccountCard extends Component {
static propTypes = {
account: PropTypes.object.isRequired,
onClick: PropTypes.func.isRequired,

View File

@ -36,7 +36,6 @@ const initialState = {
};
export default class ActionbarImport extends Component {
static propTypes = {
onConfirm: PropTypes.func.isRequired,
renderValidation: PropTypes.func,
@ -219,5 +218,4 @@ export default class ActionbarImport extends Component {
onCloseModal = () => {
this.setState(initialState);
}
}

View File

@ -68,7 +68,8 @@ export default class ActionbarSearch extends Component {
return (
<div
className={ styles.searchcontainer }
key='searchAccount'>
key='searchAccount'
>
<div className={ inputContainerClasses.join(' ') }>
<InputChip
addOnBlur
@ -87,7 +88,8 @@ export default class ActionbarSearch extends Component {
className={ styles.searchButton }
icon={ <ActionSearch /> }
label=''
onClick={ this.handleSearchClick } />
onClick={ this.handleSearchClick }
/>
</div>
);
}

Some files were not shown because too many files have changed in this diff Show More