Browse Source

receive addres copy to clipboard

all-modes
pbca26 8 years ago
parent
commit
4832a68a26
  1. 13
      react/src/components/dashboard/receiveCoin.js
  2. 3
      react/src/components/dashboard/walletsNativeReceive.js

13
react/src/components/dashboard/receiveCoin.js

@ -1,6 +1,11 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { checkAddressBasilisk, importAddressBasilisk, validateAddressBasilisk } from '../../actions/actionCreators';
import {
checkAddressBasilisk,
importAddressBasilisk,
validateAddressBasilisk,
copyCoinAddress
} from '../../actions/actionCreators';
import Store from '../../store';
// TODO: implement sorting
@ -19,6 +24,10 @@ class ReceiveCoin extends React.Component {
Store.dispatch(validateAddressBasilisk(this.props.coin, address));
}
_copyCoinAddress(address) {
Store.dispatch(copyCoinAddress(address));
}
/*importAddressBasilisk(address) {
Store.dispatch(importAddressBasilisk(this.props.coin, address));
}
@ -33,6 +42,7 @@ class ReceiveCoin extends React.Component {
<span className="label label-default">
<i className="icon fa-eye"></i> {translate('IAPI.PUBLIC_SM')}
</span>
<button className="btn btn-default btn-xs clipboard-edexaddr margin-left-10" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" onClick={() => this._copyCoinAddress(address)}><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
<span className="label label-default margin-left-10 action" title="Check" onClick={() => this._checkAddressBasilisk(address)}>
<i className="icon fa-database"></i>
</span>
@ -47,6 +57,7 @@ class ReceiveCoin extends React.Component {
<span className="label label-default">
<i className="icon fa-eye"></i> {translate('IAPI.PUBLIC_SM')}
</span>
<button className="btn btn-default btn-xs clipboard-edexaddr margin-left-10" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" onClick={() => this._copyCoinAddress(address)}><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
</td>
);
}

3
react/src/components/dashboard/walletsNativeReceive.js

@ -33,8 +33,7 @@ class WalletsNativeReceive extends React.Component {
<span className={type === 'public' ? 'label label-default' : 'label label-dark'}>
<i className={type === 'public' ? 'icon fa-eye' : 'icon fa-eye-slash'}></i> {type === 'public' ? translate('IAPI.PUBLIC_SM') : translate('KMD_NATIVE.PRIVATE')}
</span>
&nbsp;&nbsp;
<button className="btn btn-default btn-xs clipboard-edexaddr" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text="" onClick={() => this.copyZAddress(address.address)}><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
<button className="btn btn-default btn-xs clipboard-edexaddr margin-left-10" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text="" onClick={() => this.copyZAddress(address.address)}><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
</td>
<td>{type === 'public' ? address.address : address.address.substring(0, 34) + '...'}</td>
<td>{address.amount}</td>

Loading…
Cancel
Save