Cleanups (#3742)
* Remove unused file * Combine tx checks into single file * Move UI components into UI * DRY links * Unused rollup config * Cleanup util paths * Revert "Move UI components into UI" This reverts commit 3379e61246cde635c296d31322b71e63395a5cd4. * Re-apply ~/util/tx move * Cleanup unused styles
This commit is contained in:
		
							parent
							
								
									83f791fa5d
								
							
						
					
					
						commit
						befcc9cc1a
					
				
							
								
								
									
										8
									
								
								js/src/3rdparty/etherscan/links.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								js/src/3rdparty/etherscan/links.js
									
									
									
									
										vendored
									
									
								
							| @ -14,10 +14,14 @@ | |||||||
| // You should have received a copy of the GNU General Public License
 | // You should have received a copy of the GNU General Public License
 | ||||||
| // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 | // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 | ||||||
| 
 | 
 | ||||||
|  | export const url = (isTestnet = false) => { | ||||||
|  |   return `https://${isTestnet ? 'testnet.' : ''}etherscan.io`; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| export const txLink = (hash, isTestnet = false) => { | export const txLink = (hash, isTestnet = false) => { | ||||||
|   return `https://${isTestnet ? 'testnet.' : ''}etherscan.io/tx/${hash}`; |   return `${url(isTestnet)}/tx/${hash}`; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| export const addressLink = (address, isTestnet = false) => { | export const addressLink = (address, isTestnet = false) => { | ||||||
|   return `https://${isTestnet ? 'testnet.' : ''}etherscan.io/address/${address}`; |   return `${url(isTestnet)}/address/${address}`; | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -1,12 +0,0 @@ | |||||||
| import babel from 'rollup-plugin-babel'; |  | ||||||
| 
 |  | ||||||
| export default { |  | ||||||
|   entry: 'src/index.js', |  | ||||||
|   dest: 'release/index.js', |  | ||||||
|   format: 'cjs', |  | ||||||
|   plugins: [babel({ |  | ||||||
|     babelrc: false, |  | ||||||
|     presets: ['es2015-rollup', 'stage-0'], |  | ||||||
|     runtimeHelpers: true |  | ||||||
|   })] |  | ||||||
| }; |  | ||||||
| @ -19,7 +19,7 @@ import ContentAdd from 'material-ui/svg-icons/content/add'; | |||||||
| import ContentClear from 'material-ui/svg-icons/content/clear'; | import ContentClear from 'material-ui/svg-icons/content/clear'; | ||||||
| 
 | 
 | ||||||
| import { Button, Modal, Form, Input, InputAddress } from '~/ui'; | import { Button, Modal, Form, Input, InputAddress } from '~/ui'; | ||||||
| import { ERRORS, validateAddress, validateName } from '../../util/validation'; | import { ERRORS, validateAddress, validateName } from '~/util/validation'; | ||||||
| 
 | 
 | ||||||
| export default class AddAddress extends Component { | export default class AddAddress extends Component { | ||||||
|   static contextTypes = { |   static contextTypes = { | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forwa | |||||||
| import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; | import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; | ||||||
| 
 | 
 | ||||||
| import { Button, Modal, Form, Input, InputAddress, RadioButtons } from '~/ui'; | import { Button, Modal, Form, Input, InputAddress, RadioButtons } from '~/ui'; | ||||||
| import { ERRORS, validateAbi, validateAddress, validateName } from '../../util/validation'; | import { ERRORS, validateAbi, validateAddress, validateName } from '~/util/validation'; | ||||||
| 
 | 
 | ||||||
| import { eip20, wallet } from '~/contracts/abi'; | import { eip20, wallet } from '~/contracts/abi'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -16,13 +16,12 @@ | |||||||
| 
 | 
 | ||||||
| import { observable, computed, action, transaction } from 'mobx'; | import { observable, computed, action, transaction } from 'mobx'; | ||||||
| 
 | 
 | ||||||
| import { validateUint, validateAddress, validateName } from '~/util/validation'; |  | ||||||
| import { ERROR_CODES } from '~/api/transport/error'; |  | ||||||
| 
 |  | ||||||
| import Contract from '~/api/contract'; | import Contract from '~/api/contract'; | ||||||
|  | import { ERROR_CODES } from '~/api/transport/error'; | ||||||
| import { wallet as walletAbi } from '~/contracts/abi'; | import { wallet as walletAbi } from '~/contracts/abi'; | ||||||
| import { wallet as walletCode } from '~/contracts/code'; | import { wallet as walletCode } from '~/contracts/code'; | ||||||
| 
 | 
 | ||||||
|  | import { validateUint, validateAddress, validateName } from '~/util/validation'; | ||||||
| import WalletsUtils from '~/util/wallets'; | import WalletsUtils from '~/util/wallets'; | ||||||
| 
 | 
 | ||||||
| const STEPS = { | const STEPS = { | ||||||
|  | |||||||
| @ -18,8 +18,8 @@ import React, { Component, PropTypes } from 'react'; | |||||||
| import { MenuItem } from 'material-ui'; | import { MenuItem } from 'material-ui'; | ||||||
| 
 | 
 | ||||||
| import { AddressSelect, Form, Input, Select } from '~/ui'; | import { AddressSelect, Form, Input, Select } from '~/ui'; | ||||||
| import { validateAbi } from '../../../util/validation'; | import { validateAbi } from '~/util/validation'; | ||||||
| import { parseAbiType } from '../../../util/abi'; | import { parseAbiType } from '~/util/abi'; | ||||||
| 
 | 
 | ||||||
| export default class DetailsStep extends Component { | export default class DetailsStep extends Component { | ||||||
|   static contextTypes = { |   static contextTypes = { | ||||||
|  | |||||||
| @ -32,7 +32,7 @@ | |||||||
| import React, { Component, PropTypes } from 'react'; | import React, { Component, PropTypes } from 'react'; | ||||||
| 
 | 
 | ||||||
| import { Form, TypedInput } from '~/ui'; | import { Form, TypedInput } from '~/ui'; | ||||||
| import { parseAbiType } from '../../../util/abi'; | import { parseAbiType } from '~/util/abi'; | ||||||
| 
 | 
 | ||||||
| import styles from '../deployContract.css'; | import styles from '../deployContract.css'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; | |||||||
| import ContentClear from 'material-ui/svg-icons/content/clear'; | import ContentClear from 'material-ui/svg-icons/content/clear'; | ||||||
| 
 | 
 | ||||||
| import { BusyStep, CompletedStep, CopyToClipboard, Button, IdentityIcon, Modal, TxHash } from '~/ui'; | import { BusyStep, CompletedStep, CopyToClipboard, Button, IdentityIcon, Modal, TxHash } from '~/ui'; | ||||||
| import { ERRORS, validateAbi, validateCode, validateName } from '../../util/validation'; | import { ERRORS, validateAbi, validateCode, validateName } from '~/util/validation'; | ||||||
| 
 | 
 | ||||||
| import DetailsStep from './DetailsStep'; | import DetailsStep from './DetailsStep'; | ||||||
| import ParametersStep from './ParametersStep'; | import ParametersStep from './ParametersStep'; | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ import ContentClear from 'material-ui/svg-icons/content/clear'; | |||||||
| import ContentSave from 'material-ui/svg-icons/content/save'; | import ContentSave from 'material-ui/svg-icons/content/save'; | ||||||
| 
 | 
 | ||||||
| import { Button, Form, Input, InputChip, Modal } from '~/ui'; | import { Button, Form, Input, InputChip, Modal } from '~/ui'; | ||||||
| import { validateName } from '../../util/validation'; | import { validateName } from '~/util/validation'; | ||||||
| 
 | 
 | ||||||
| export default class EditMeta extends Component { | export default class EditMeta extends Component { | ||||||
|   static contextTypes = { |   static contextTypes = { | ||||||
|  | |||||||
| @ -21,8 +21,8 @@ import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; | |||||||
| import ContentClear from 'material-ui/svg-icons/content/clear'; | import ContentClear from 'material-ui/svg-icons/content/clear'; | ||||||
| 
 | 
 | ||||||
| import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui'; | import { BusyStep, CompletedStep, Button, IdentityIcon, Modal, TxHash } from '~/ui'; | ||||||
| import { MAX_GAS_ESTIMATION } from '../../util/constants'; | import { MAX_GAS_ESTIMATION } from '~/util/constants'; | ||||||
| import { validateAddress, validateUint } from '../../util/validation'; | import { validateAddress, validateUint } from '~/util/validation'; | ||||||
| import { parseAbiType } from '~/util/abi'; | import { parseAbiType } from '~/util/abi'; | ||||||
| 
 | 
 | ||||||
| import DetailsStep from './DetailsStep'; | import DetailsStep from './DetailsStep'; | ||||||
|  | |||||||
| @ -21,9 +21,8 @@ import { sha3 } from '~/api/util/sha3'; | |||||||
| import Contracts from '~/contracts'; | import Contracts from '~/contracts'; | ||||||
| 
 | 
 | ||||||
| import { checkIfVerified, checkIfRequested, awaitPuzzle } from '~/contracts/sms-verification'; | import { checkIfVerified, checkIfRequested, awaitPuzzle } from '~/contracts/sms-verification'; | ||||||
| import { postToServer } from '../../3rdparty/sms-verification'; | import { postToServer } from '~/3rdparty/sms-verification'; | ||||||
| import checkIfTxFailed from '../../util/check-if-tx-failed'; | import { checkIfTxFailed, waitForConfirmations } from '~/util/tx'; | ||||||
| import waitForConfirmations from '../../util/wait-for-block-confirmations'; |  | ||||||
| 
 | 
 | ||||||
| export const LOADING = 'fetching-contract'; | export const LOADING = 'fetching-contract'; | ||||||
| export const QUERY_DATA = 'query-data'; | export const QUERY_DATA = 'query-data'; | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ import SaveIcon from 'material-ui/svg-icons/content/save'; | |||||||
| import ContentClear from 'material-ui/svg-icons/content/clear'; | import ContentClear from 'material-ui/svg-icons/content/clear'; | ||||||
| 
 | 
 | ||||||
| import { Button, Modal, Editor, Form, Input } from '~/ui'; | import { Button, Modal, Editor, Form, Input } from '~/ui'; | ||||||
| import { ERRORS, validateName } from '../../util/validation'; | import { ERRORS, validateName } from '~/util/validation'; | ||||||
| 
 | 
 | ||||||
| import styles from './saveContract.css'; | import styles from './saveContract.css'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; | |||||||
| import ContentClear from 'material-ui/svg-icons/content/clear'; | import ContentClear from 'material-ui/svg-icons/content/clear'; | ||||||
| 
 | 
 | ||||||
| import { Button, IdentityIcon, Modal } from '~/ui'; | import { Button, IdentityIcon, Modal } from '~/ui'; | ||||||
| import initShapeshift from '../../3rdparty/shapeshift'; | import initShapeshift from '~/3rdparty/shapeshift'; | ||||||
| import shapeshiftLogo from '../../../assets/images/shapeshift-logo.png'; | import shapeshiftLogo from '../../../assets/images/shapeshift-logo.png'; | ||||||
| 
 | 
 | ||||||
| import AwaitingDepositStep from './AwaitingDepositStep'; | import AwaitingDepositStep from './AwaitingDepositStep'; | ||||||
|  | |||||||
| @ -17,12 +17,10 @@ | |||||||
| import { isEqual, uniq } from 'lodash'; | import { isEqual, uniq } from 'lodash'; | ||||||
| 
 | 
 | ||||||
| import Contract from '~/api/contract'; | import Contract from '~/api/contract'; | ||||||
| import { wallet as WALLET_ABI } from '~/contracts/abi'; |  | ||||||
| import { bytesToHex, toHex } from '~/api/util/format'; | import { bytesToHex, toHex } from '~/api/util/format'; | ||||||
| 
 |  | ||||||
| import { ERROR_CODES } from '~/api/transport/error'; | import { ERROR_CODES } from '~/api/transport/error'; | ||||||
| import { MAX_GAS_ESTIMATION } from '../../util/constants'; | import { wallet as WALLET_ABI } from '~/contracts/abi'; | ||||||
| 
 | import { MAX_GAS_ESTIMATION } from '~/util/constants'; | ||||||
| import WalletsUtils from '~/util/wallets'; | import WalletsUtils from '~/util/wallets'; | ||||||
| 
 | 
 | ||||||
| import { newError } from '~/ui/Errors/actions'; | import { newError } from '~/ui/Errors/actions'; | ||||||
|  | |||||||
| @ -22,12 +22,11 @@ import IconButton from 'material-ui/IconButton'; | |||||||
| import AddIcon from 'material-ui/svg-icons/content/add'; | import AddIcon from 'material-ui/svg-icons/content/add'; | ||||||
| import RemoveIcon from 'material-ui/svg-icons/content/remove'; | import RemoveIcon from 'material-ui/svg-icons/content/remove'; | ||||||
| 
 | 
 | ||||||
|  | import { fromWei, toWei } from '~/api/util/wei'; | ||||||
| import Input from '~/ui/Form/Input'; | import Input from '~/ui/Form/Input'; | ||||||
| import InputAddressSelect from '~/ui/Form/InputAddressSelect'; | import InputAddressSelect from '~/ui/Form/InputAddressSelect'; | ||||||
| import Select from '~/ui/Form/Select'; | import Select from '~/ui/Form/Select'; | ||||||
| 
 |  | ||||||
| import { ABI_TYPES } from '~/util/abi'; | import { ABI_TYPES } from '~/util/abi'; | ||||||
| import { fromWei, toWei } from '~/api/util/wei'; |  | ||||||
| 
 | 
 | ||||||
| import styles from './typedInput.css'; | import styles from './typedInput.css'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ import { connect } from 'react-redux'; | |||||||
| import { bindActionCreators } from 'redux'; | import { bindActionCreators } from 'redux'; | ||||||
| import { LinearProgress } from 'material-ui'; | import { LinearProgress } from 'material-ui'; | ||||||
| 
 | 
 | ||||||
| import { txLink } from '../../3rdparty/etherscan/links'; | import { txLink } from '~/3rdparty/etherscan/links'; | ||||||
| import ShortenedHash from '../ShortenedHash'; | import ShortenedHash from '../ShortenedHash'; | ||||||
| 
 | 
 | ||||||
| import styles from './txHash.css'; | import styles from './txHash.css'; | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ import { connect } from 'react-redux'; | |||||||
| import { bindActionCreators } from 'redux'; | import { bindActionCreators } from 'redux'; | ||||||
| import { observer } from 'mobx-react'; | import { observer } from 'mobx-react'; | ||||||
| 
 | 
 | ||||||
| import { txLink, addressLink } from '../../3rdparty/etherscan/links'; | import { txLink, addressLink } from '~/3rdparty/etherscan/links'; | ||||||
| 
 | 
 | ||||||
| import IdentityIcon from '../IdentityIcon'; | import IdentityIcon from '../IdentityIcon'; | ||||||
| import IdentityName from '../IdentityName'; | import IdentityName from '../IdentityName'; | ||||||
|  | |||||||
| @ -1,28 +0,0 @@ | |||||||
| // Copyright 2015, 2016 Ethcore (UK) Ltd.
 |  | ||||||
| // This file is part of Parity.
 |  | ||||||
| 
 |  | ||||||
| // Parity is free software: you can redistribute it and/or modify
 |  | ||||||
| // it under the terms of the GNU General Public License as published by
 |  | ||||||
| // the Free Software Foundation, either version 3 of the License, or
 |  | ||||||
| // (at your option) any later version.
 |  | ||||||
| 
 |  | ||||||
| // Parity is distributed in the hope that it will be useful,
 |  | ||||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of
 |  | ||||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 |  | ||||||
| // GNU General Public License for more details.
 |  | ||||||
| 
 |  | ||||||
| // You should have received a copy of the GNU General Public License
 |  | ||||||
| // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 |  | ||||||
| 
 |  | ||||||
| const checkIfTxFailed = (api, tx, gasSent) => { |  | ||||||
|   return api.pollMethod('eth_getTransactionReceipt', tx) |  | ||||||
|   .then((receipt) => { |  | ||||||
|     // TODO: Right now, there's no way to tell wether the EVM code crashed.
 |  | ||||||
|     // Because you usually send a bit more gas than estimated (to make sure
 |  | ||||||
|     // it gets mined quickly), we transaction probably failed if all the gas
 |  | ||||||
|     // has been used up.
 |  | ||||||
|     return receipt.gasUsed.eq(gasSent); |  | ||||||
|   }); |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| export default checkIfTxFailed; |  | ||||||
| @ -1,19 +0,0 @@ | |||||||
| // Copyright 2015, 2016 Ethcore (UK) Ltd.
 |  | ||||||
| // This file is part of Parity.
 |  | ||||||
| 
 |  | ||||||
| // Parity is free software: you can redistribute it and/or modify
 |  | ||||||
| // it under the terms of the GNU General Public License as published by
 |  | ||||||
| // the Free Software Foundation, either version 3 of the License, or
 |  | ||||||
| // (at your option) any later version.
 |  | ||||||
| 
 |  | ||||||
| // Parity is distributed in the hope that it will be useful,
 |  | ||||||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of
 |  | ||||||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 |  | ||||||
| // GNU General Public License for more details.
 |  | ||||||
| 
 |  | ||||||
| // You should have received a copy of the GNU General Public License
 |  | ||||||
| // along with Parity.  If not, see <http://www.gnu.org/licenses/>.
 |  | ||||||
| 
 |  | ||||||
| export default (chain) => { |  | ||||||
|   return chain === 'morden' || chain === 'ropsten' || chain === 'testnet'; |  | ||||||
| }; |  | ||||||
| @ -18,7 +18,18 @@ const isValidReceipt = (receipt) => { | |||||||
|   return receipt && receipt.blockNumber && receipt.blockNumber.gt(0); |   return receipt && receipt.blockNumber && receipt.blockNumber.gt(0); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| const waitForConfirmations = (api, tx, confirmations) => { | export function checkIfTxFailed (api, tx, gasSent) { | ||||||
|  |   return api.pollMethod('eth_getTransactionReceipt', tx) | ||||||
|  |   .then((receipt) => { | ||||||
|  |     // TODO: Right now, there's no way to tell wether the EVM code crashed.
 | ||||||
|  |     // Because you usually send a bit more gas than estimated (to make sure
 | ||||||
|  |     // it gets mined quickly), we transaction probably failed if all the gas
 | ||||||
|  |     // has been used up.
 | ||||||
|  |     return receipt.gasUsed.eq(gasSent); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | export function waitForConfirmations (api, tx, confirmations) { | ||||||
|   return new Promise((resolve, reject) => { |   return new Promise((resolve, reject) => { | ||||||
|     api.pollMethod('eth_getTransactionReceipt', tx, isValidReceipt) |     api.pollMethod('eth_getTransactionReceipt', tx, isValidReceipt) | ||||||
|     .then((receipt) => { |     .then((receipt) => { | ||||||
| @ -39,6 +50,4 @@ const waitForConfirmations = (api, tx, confirmations) => { | |||||||
|       .catch(reject); |       .catch(reject); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
| }; | } | ||||||
| 
 |  | ||||||
| export default waitForConfirmations; |  | ||||||
| @ -15,9 +15,6 @@ | |||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| .transactions { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .infonone { | .infonone { | ||||||
|   opacity: 0.25; |   opacity: 0.25; | ||||||
| } | } | ||||||
|  | |||||||
| @ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react'; | |||||||
| import { connect } from 'react-redux'; | import { connect } from 'react-redux'; | ||||||
| import { bindActionCreators } from 'redux'; | import { bindActionCreators } from 'redux'; | ||||||
| 
 | 
 | ||||||
| import etherscan from '../../../3rdparty/etherscan'; | import etherscan from '~/3rdparty/etherscan'; | ||||||
| import { Container, TxList } from '~/ui'; | import { Container, TxList } from '~/ui'; | ||||||
| 
 | 
 | ||||||
| import styles from './transactions.css'; | import styles from './transactions.css'; | ||||||
|  | |||||||
| @ -14,8 +14,6 @@ | |||||||
| /* You should have received a copy of the GNU General Public License | /* You should have received a copy of the GNU General Public License | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| .account { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .btnicon { | .btnicon { | ||||||
|   width: 24px; |   width: 24px; | ||||||
|  | |||||||
| @ -105,7 +105,7 @@ class Account extends Component { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.account }> |       <div> | ||||||
|         { this.renderDeleteDialog(account) } |         { this.renderDeleteDialog(account) } | ||||||
|         { this.renderEditDialog(account) } |         { this.renderEditDialog(account) } | ||||||
|         { this.renderFundDialog() } |         { this.renderFundDialog() } | ||||||
|  | |||||||
| @ -14,8 +14,6 @@ | |||||||
| /* You should have received a copy of the GNU General Public License | /* You should have received a copy of the GNU General Public License | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| .accounts { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .accountTooltip { | .accountTooltip { | ||||||
|   top: 13.3em; |   top: 13.3em; | ||||||
|  | |||||||
| @ -82,7 +82,7 @@ class Accounts extends Component { | |||||||
| 
 | 
 | ||||||
|   render () { |   render () { | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.accounts }> |       <div> | ||||||
|         { this.renderNewDialog() } |         { this.renderNewDialog() } | ||||||
|         { this.renderNewWalletDialog() } |         { this.renderNewWalletDialog() } | ||||||
|         { this.renderActionbar() } |         { this.renderActionbar() } | ||||||
|  | |||||||
| @ -14,37 +14,37 @@ | |||||||
| /* You should have received a copy of the GNU General Public License | /* You should have received a copy of the GNU General Public License | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| .address { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .delete .hero { | .delete { | ||||||
|  |   .hero { | ||||||
|     padding-bottom: 1em; |     padding-bottom: 1em; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .info { |   .info { | ||||||
|     display: inline-block; |     display: inline-block; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .icon { |   .icon { | ||||||
|     display: inline-block; |     display: inline-block; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .nameinfo { |   .nameinfo { | ||||||
|     display: inline-block; |     display: inline-block; | ||||||
|     text-align: left; |     text-align: left; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .header { |   .header { | ||||||
|     text-transform: uppercase; |     text-transform: uppercase; | ||||||
|     font-size: 1.25em; |     font-size: 1.25em; | ||||||
|     padding-bottom: 0.25em; |     padding-bottom: 0.25em; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .address { |   .address { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .delete .description { |   .description { | ||||||
|     padding-top: 1em; |     padding-top: 1em; | ||||||
|     font-size: 0.75em; |     font-size: 0.75em; | ||||||
|     color: #aaa; |     color: #aaa; | ||||||
|   } |   } | ||||||
|  | } | ||||||
|  | |||||||
| @ -28,8 +28,6 @@ import Transactions from '../Account/Transactions'; | |||||||
| import Delete from './Delete'; | import Delete from './Delete'; | ||||||
| import { setVisibleAccounts } from '~/redux/providers/personalActions'; | import { setVisibleAccounts } from '~/redux/providers/personalActions'; | ||||||
| 
 | 
 | ||||||
| import styles from './address.css'; |  | ||||||
| 
 |  | ||||||
| class Address extends Component { | class Address extends Component { | ||||||
|   static contextTypes = { |   static contextTypes = { | ||||||
|     api: PropTypes.object.isRequired, |     api: PropTypes.object.isRequired, | ||||||
| @ -85,7 +83,7 @@ class Address extends Component { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.address }> |       <div> | ||||||
|         { this.renderEditDialog(contact) } |         { this.renderEditDialog(contact) } | ||||||
|         { this.renderActionbar(contact) } |         { this.renderActionbar(contact) } | ||||||
|         <Delete |         <Delete | ||||||
|  | |||||||
| @ -14,8 +14,6 @@ | |||||||
| /* You should have received a copy of the GNU General Public License | /* You should have received a copy of the GNU General Public License | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| .addresses { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .list { | .list { | ||||||
|   display: flex; |   display: flex; | ||||||
| @ -26,21 +24,21 @@ | |||||||
|   flex: 0 1 50%; |   flex: 0 1 50%; | ||||||
|   width: 50%; |   width: 50%; | ||||||
|   position: relative; |   position: relative; | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .address:nth-child(odd)>div { |   &:nth-child(odd)>div { | ||||||
|     padding-right: 0.5em !important; |     padding-right: 0.5em !important; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .address:nth-child(even)>div { |   &:nth-child(even)>div { | ||||||
|     padding-left: 0.5em !important; |     padding-left: 0.5em !important; | ||||||
|   } |   } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| .empty { | .empty { | ||||||
|   width: 100%; |   width: 100%; | ||||||
|   display: block; |   display: block; | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .empty div { |   div { | ||||||
|     color: #aaa; |     color: #aaa; | ||||||
|   } |   } | ||||||
|  | } | ||||||
|  | |||||||
| @ -76,7 +76,7 @@ class Addresses extends Component { | |||||||
|     const { searchValues, sortOrder } = this.state; |     const { searchValues, sortOrder } = this.state; | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.addresses }> |       <div> | ||||||
|         { this.renderActionbar() } |         { this.renderActionbar() } | ||||||
|         { this.renderAddAddress() } |         { this.renderAddAddress() } | ||||||
|         <Page> |         <Page> | ||||||
|  | |||||||
| @ -19,7 +19,6 @@ import { connect } from 'react-redux'; | |||||||
| import { bindActionCreators } from 'redux'; | import { bindActionCreators } from 'redux'; | ||||||
| import ActionCompareArrows from 'material-ui/svg-icons/action/compare-arrows'; | import ActionCompareArrows from 'material-ui/svg-icons/action/compare-arrows'; | ||||||
| import ActionDashboard from 'material-ui/svg-icons/action/dashboard'; | import ActionDashboard from 'material-ui/svg-icons/action/dashboard'; | ||||||
| // import CommunicationVpnKey from 'material-ui/svg-icons/communication/vpn-key';
 |  | ||||||
| import HardwareDesktopMac from 'material-ui/svg-icons/hardware/desktop-mac'; | import HardwareDesktopMac from 'material-ui/svg-icons/hardware/desktop-mac'; | ||||||
| import NotificationVpnLock from 'material-ui/svg-icons/notification/vpn-lock'; | import NotificationVpnLock from 'material-ui/svg-icons/notification/vpn-lock'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ import React, { Component, PropTypes } from 'react'; | |||||||
| 
 | 
 | ||||||
| import { IdentityIcon, IdentityName, Input, InputAddress } from '~/ui'; | import { IdentityIcon, IdentityName, Input, InputAddress } from '~/ui'; | ||||||
| import ShortenedHash from '~/ui/ShortenedHash'; | import ShortenedHash from '~/ui/ShortenedHash'; | ||||||
| import { txLink } from '../../../../3rdparty/etherscan/links'; | import { txLink } from '~/3rdparty/etherscan/links'; | ||||||
| 
 | 
 | ||||||
| import styles from '../../contract.css'; | import styles from '../../contract.css'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -15,26 +15,26 @@ | |||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| .contract { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .events { | .events { | ||||||
|   width: 100%; |   width: 100%; | ||||||
|   border: none; |   border: none; | ||||||
|   border-spacing: 0; |   border-spacing: 0; | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .events tr { |   tr { | ||||||
|     line-height: 32px; |     line-height: 32px; | ||||||
|     vertical-align: top; |     vertical-align: top; | ||||||
|   } |   } | ||||||
| 
 |  | ||||||
| .event { |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .event td { | .event { | ||||||
|  |   td { | ||||||
|     vertical-align: top; |     vertical-align: top; | ||||||
|     padding: 1em 0.5em; |     padding: 1em 0.5em; | ||||||
|  | 
 | ||||||
|  |     div { | ||||||
|  |       white-space: nowrap; | ||||||
|  |     } | ||||||
|  |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .txhash { | .txhash { | ||||||
| @ -47,10 +47,6 @@ | |||||||
|   color: #aaa; |   color: #aaa; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .event td div { |  | ||||||
|   white-space: nowrap; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .mined { | .mined { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -124,7 +124,7 @@ class Contract extends Component { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.contract }> |       <div> | ||||||
|         { this.renderActionbar(account) } |         { this.renderActionbar(account) } | ||||||
|         { this.renderDeleteDialog(account) } |         { this.renderDeleteDialog(account) } | ||||||
|         { this.renderEditDialog(account) } |         { this.renderEditDialog(account) } | ||||||
|  | |||||||
| @ -1,18 +0,0 @@ | |||||||
| /* Copyright 2015, 2016 Ethcore (UK) Ltd. |  | ||||||
| /* This file is part of Parity. |  | ||||||
| /* |  | ||||||
| /* Parity is free software: you can redistribute it and/or modify |  | ||||||
| /* it under the terms of the GNU General Public License as published by |  | ||||||
| /* the Free Software Foundation, either version 3 of the License, or |  | ||||||
| /* (at your option) any later version. |  | ||||||
| /* |  | ||||||
| /* Parity is distributed in the hope that it will be useful, |  | ||||||
| /* but WITHOUT ANY WARRANTY; without even the implied warranty of |  | ||||||
| /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | ||||||
| /* GNU General Public License for more details. |  | ||||||
| /* |  | ||||||
| /* You should have received a copy of the GNU General Public License |  | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. |  | ||||||
| */ |  | ||||||
| .contracts { |  | ||||||
| } |  | ||||||
| @ -28,8 +28,6 @@ import { setVisibleAccounts } from '~/redux/providers/personalActions'; | |||||||
| 
 | 
 | ||||||
| import List from '../Accounts/List'; | import List from '../Accounts/List'; | ||||||
| 
 | 
 | ||||||
| import styles from './contracts.css'; |  | ||||||
| 
 |  | ||||||
| class Contracts extends Component { | class Contracts extends Component { | ||||||
|   static contextTypes = { |   static contextTypes = { | ||||||
|     api: PropTypes.object.isRequired |     api: PropTypes.object.isRequired | ||||||
| @ -80,7 +78,7 @@ class Contracts extends Component { | |||||||
|     const { searchValues, sortOrder } = this.state; |     const { searchValues, sortOrder } = this.state; | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.contracts }> |       <div> | ||||||
|         { this.renderActionbar() } |         { this.renderActionbar() } | ||||||
|         { this.renderAddContract() } |         { this.renderAddContract() } | ||||||
|         { this.renderAddContract() } |         { this.renderAddContract() } | ||||||
| @ -159,7 +157,6 @@ class Contracts extends Component { | |||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <Actionbar |       <Actionbar | ||||||
|         className={ styles.toolbar } |  | ||||||
|         title='Contracts' |         title='Contracts' | ||||||
|         buttons={ buttons } /> |         buttons={ buttons } /> | ||||||
|     ); |     ); | ||||||
|  | |||||||
| @ -15,9 +15,6 @@ | |||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| .layout { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .menu { | .menu { | ||||||
|   display: inline-block; |   display: inline-block; | ||||||
| } | } | ||||||
| @ -35,32 +32,25 @@ | |||||||
|   padding: 16px 2em !important; |   padding: 16px 2em !important; | ||||||
|   line-height: 24px !important; |   line-height: 24px !important; | ||||||
|   width: auto !important; |   width: auto !important; | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .tabactive { |   &>div { | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .tab>div, |  | ||||||
| .tabactive>div { |  | ||||||
|     height: 24px !important; |     height: 24px !important; | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .tab>div>div, |     &>div { | ||||||
| .tabactive>div>div { |  | ||||||
|       display: inline-block !important; |       display: inline-block !important; | ||||||
|     } |     } | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
| .tab svg, |   svg { | ||||||
| .tabactive svg { |  | ||||||
|     margin-right: 0.5em; |     margin-right: 0.5em; | ||||||
|     margin-bottom: 0 !important; |     margin-bottom: 0 !important; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| .tab .menu, |   .menu { | ||||||
| .tabactive .menu { |  | ||||||
|     vertical-align: top; |     vertical-align: top; | ||||||
|     display: inline-block; |     display: inline-block; | ||||||
|   } |   } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| .imageIcon { | .imageIcon { | ||||||
|   height: 20px; |   height: 20px; | ||||||
| @ -68,6 +58,8 @@ | |||||||
|   opacity: 0.5; |   opacity: 0.5; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .tabactive .imageIcon { | .tabactive { | ||||||
|  |   .imageIcon { | ||||||
|     opacity: 1; |     opacity: 1; | ||||||
|   } |   } | ||||||
|  | } | ||||||
|  | |||||||
| @ -45,7 +45,7 @@ export default class Settings extends Component { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.layout }> |       <div> | ||||||
|         <Actionbar title='settings' className={ styles.bar }> |         <Actionbar title='settings' className={ styles.bar }> | ||||||
|           <Tabs className={ styles.tabs } value={ hash }> |           <Tabs className={ styles.tabs } value={ hash }> | ||||||
|             { this.renderTab(hash, 'views', <ImageRemoveRedEye />) } |             { this.renderTab(hash, 'views', <ImageRemoveRedEye />) } | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ | |||||||
| 
 | 
 | ||||||
| import React, { Component, PropTypes } from 'react'; | import React, { Component, PropTypes } from 'react'; | ||||||
| 
 | 
 | ||||||
| import { addressLink } from '../../../../../3rdparty/etherscan/links'; | import { addressLink } from '~/3rdparty/etherscan/links'; | ||||||
| import styles from './AccountLink.css'; | import styles from './AccountLink.css'; | ||||||
| 
 | 
 | ||||||
| export default class AccountLink extends Component { | export default class AccountLink extends Component { | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ | |||||||
| 
 | 
 | ||||||
| import React, { Component, PropTypes } from 'react'; | import React, { Component, PropTypes } from 'react'; | ||||||
| 
 | 
 | ||||||
| import { txLink } from '../../../../3rdparty/etherscan/links'; | import { txLink } from '~/3rdparty/etherscan/links'; | ||||||
| 
 | 
 | ||||||
| export default class TxHashLink extends Component { | export default class TxHashLink extends Component { | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -23,9 +23,6 @@ | |||||||
|   width: $embedWidth; |   width: $embedWidth; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .pending { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .none { | .none { | ||||||
|   color: #aaa; |   color: #aaa; | ||||||
| } | } | ||||||
|  | |||||||
| @ -71,7 +71,7 @@ class Embedded extends Component { | |||||||
|     const items = pending.sort(this._sortRequests).map(this.renderPending); |     const items = pending.sort(this._sortRequests).map(this.renderPending); | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.pending }> |       <div> | ||||||
|         { items } |         { items } | ||||||
|       </div> |       </div> | ||||||
|     ); |     ); | ||||||
|  | |||||||
| @ -15,12 +15,6 @@ | |||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| .request { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .noRequestsMsg { | .noRequestsMsg { | ||||||
|   color: #aaa; |   color: #aaa; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| .items { |  | ||||||
| } |  | ||||||
|  | |||||||
| @ -98,9 +98,7 @@ class RequestsPage extends Component { | |||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <Container title='Pending Requests'> |       <Container title='Pending Requests'> | ||||||
|         <div className={ styles.items }> |  | ||||||
|         { items } |         { items } | ||||||
|         </div> |  | ||||||
|       </Container> |       </Container> | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
| @ -111,7 +109,6 @@ class RequestsPage extends Component { | |||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|       <RequestPending |       <RequestPending | ||||||
|         className={ styles.request } |  | ||||||
|         onConfirm={ actions.startConfirmRequest } |         onConfirm={ actions.startConfirmRequest } | ||||||
|         onReject={ actions.startRejectRequest } |         onReject={ actions.startRejectRequest } | ||||||
|         isSending={ isSending || false } |         isSending={ isSending || false } | ||||||
|  | |||||||
| @ -1,24 +0,0 @@ | |||||||
| /* Copyright 2015, 2016 Ethcore (UK) Ltd. |  | ||||||
| /* This file is part of Parity. |  | ||||||
| /* |  | ||||||
| /* Parity is free software: you can redistribute it and/or modify |  | ||||||
| /* it under the terms of the GNU General Public License as published by |  | ||||||
| /* the Free Software Foundation, either version 3 of the License, or |  | ||||||
| /* (at your option) any later version. |  | ||||||
| /* |  | ||||||
| /* Parity is distributed in the hope that it will be useful, |  | ||||||
| /* but WITHOUT ANY WARRANTY; without even the implied warranty of |  | ||||||
| /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | ||||||
| /* GNU General Public License for more details. |  | ||||||
| /* |  | ||||||
| /* You should have received a copy of the GNU General Public License |  | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. |  | ||||||
| */ |  | ||||||
| .signer { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .container { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .mainContainer { |  | ||||||
| } |  | ||||||
| @ -19,12 +19,10 @@ import React, { Component } from 'react'; | |||||||
| import { Actionbar } from '~/ui'; | import { Actionbar } from '~/ui'; | ||||||
| import RequestsPage from './containers/RequestsPage'; | import RequestsPage from './containers/RequestsPage'; | ||||||
| 
 | 
 | ||||||
| import styles from './signer.css'; |  | ||||||
| 
 |  | ||||||
| export default class Signer extends Component { | export default class Signer extends Component { | ||||||
|   render () { |   render () { | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.signer }> |       <div> | ||||||
|         <Actionbar |         <Actionbar | ||||||
|           title='Trusted Signer' /> |           title='Trusted Signer' /> | ||||||
|         <RequestsPage /> |         <RequestsPage /> | ||||||
|  | |||||||
| @ -23,8 +23,6 @@ import { clearStatusLogs, toggleStatusLogs, toggleStatusRefresh } from '~/redux/ | |||||||
| import Debug from '../../components/Debug'; | import Debug from '../../components/Debug'; | ||||||
| import Status from '../../components/Status'; | import Status from '../../components/Status'; | ||||||
| 
 | 
 | ||||||
| import styles from './statusPage.css'; |  | ||||||
| 
 |  | ||||||
| class StatusPage extends Component { | class StatusPage extends Component { | ||||||
|   static propTypes = { |   static propTypes = { | ||||||
|     nodeStatus: PropTypes.object.isRequired, |     nodeStatus: PropTypes.object.isRequired, | ||||||
| @ -41,7 +39,7 @@ class StatusPage extends Component { | |||||||
| 
 | 
 | ||||||
|   render () { |   render () { | ||||||
|     return ( |     return ( | ||||||
|       <div className={ styles.body }> |       <div> | ||||||
|         <Status { ...this.props } /> |         <Status { ...this.props } /> | ||||||
|         <Debug { ...this.props } /> |         <Debug { ...this.props } /> | ||||||
|       </div> |       </div> | ||||||
|  | |||||||
| @ -1,18 +0,0 @@ | |||||||
| /* Copyright 2015, 2016 Ethcore (UK) Ltd. |  | ||||||
| /* This file is part of Parity. |  | ||||||
| /* |  | ||||||
| /* Parity is free software: you can redistribute it and/or modify |  | ||||||
| /* it under the terms of the GNU General Public License as published by |  | ||||||
| /* the Free Software Foundation, either version 3 of the License, or |  | ||||||
| /* (at your option) any later version. |  | ||||||
| /* |  | ||||||
| /* Parity is distributed in the hope that it will be useful, |  | ||||||
| /* but WITHOUT ANY WARRANTY; without even the implied warranty of |  | ||||||
| /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | ||||||
| /* GNU General Public License for more details. |  | ||||||
| /* |  | ||||||
| /* You should have received a copy of the GNU General Public License |  | ||||||
| /* along with Parity.  If not, see <http://www.gnu.org/licenses/>. |  | ||||||
| */ |  | ||||||
| .body { |  | ||||||
| } |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user