Browse Source

native only (wip)

all-modes
pbca26 8 years ago
parent
commit
ecdc5e8999
  1. 8
      react/src/components/addcoin/addcoin.js
  2. 2
      react/src/components/addcoin/coin-selectors.render.js
  3. 3
      react/src/components/dashboard/coinTile/coinTileItem.js
  4. 4
      react/src/components/dashboard/navbar/navbar.js
  5. 2
      react/src/components/dashboard/navbar/navbar.render.js
  6. 4
      react/src/components/dashboard/walletsNav/walletsNav.js
  7. 4
      react/src/components/dashboard/walletsNav/walletsNav.render.js

8
react/src/components/addcoin/addcoin.js

@ -59,7 +59,7 @@ class AddCoin extends React.Component {
loadCoinSelection() {
shepherdGetCoinList()
.then(function(json) {
.then((json) => {
if (json.msg !== 'error') {
this.setState(Object.assign({}, this.state, {
coins: json.result,
@ -74,7 +74,7 @@ class AddCoin extends React.Component {
)
);
}
}.bind(this));
});
}
toggleSyncOnlyMode(index) {
@ -122,7 +122,7 @@ class AddCoin extends React.Component {
updateSelectedCoin(e, index) {
const coin = e.target.value.split('|');
const defaultMode = coin[1];
const defaultMode = Config.iguanaLessMode ? 'native' : coin[1];
const modeToValue = {
'full': 1,
'basilisk': 0,
@ -148,6 +148,8 @@ class AddCoin extends React.Component {
syncOnly: this.state.coins[index].syncOnly,
}
console.log('coin', _coins);
this.setState(Object.assign({}, this.state, {
coins: _coins,
}));

2
react/src/components/addcoin/coin-selectors.render.js

@ -94,7 +94,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span>
</label>
</div>
<div className="form-group col-lg-4 col-md-4 col-sm-12 col-xs-12 style-addcoin-lbl-mdl-login">
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6" style={{ paddingLeft: this.state.nativeOnly ? '0' : 'inherit' }}>
<input
type="radio"
className="to-labelauty labelauty"

3
react/src/components/dashboard/coinTile/coinTileItem.js

@ -1,5 +1,6 @@
import React from 'react';
import {
Config,
dashboardChangeActiveCoin,
iguanaActiveHandle,
getAddressesByAccount,
@ -47,7 +48,7 @@ class CoinTileItem extends React.Component {
this.props.Dashboard.progress.blocks &&
this.props.Dashboard.progress.longestchain &&
syncPercentage &&
syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD) {
(Config.iguanaLessMode || syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD)) {
Store.dispatch(getSyncInfoNative(coin, true));
Store.dispatch(getKMDBalanceTotal(coin));
Store.dispatch(getNativeTxHistory(coin));

4
react/src/components/dashboard/navbar/navbar.js

@ -6,7 +6,8 @@ import {
startInterval,
toggleSyncOnlyModal,
getSyncOnlyForks,
logout
logout,
Config
} from '../../../actions/actionCreators';
import Store from '../../../store';
@ -17,6 +18,7 @@ class Navbar extends React.Component {
super(props);
this.state = {
openDropMenu: false,
nativeOnly: Config.iguanaLessMode,
};
this.openDropMenu = this.openDropMenu.bind(this);
this.logout = this.logout.bind(this);

2
react/src/components/dashboard/navbar/navbar.render.js

@ -52,7 +52,7 @@ const NavbarRender = function() {
</li>
<li className={ this.isSectionActive('edex') ? 'active nav-top-menu' : 'nav-top-menu' }>
<a onClick={ () => this.dashboardChangeSection('edex') }>
<i className="site-menu-icon"></i> EasyDEX
<i className="site-menu-icon"></i> BarterDEX
</a>
</li>
<li className={ 'hide ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }>

4
react/src/components/dashboard/walletsNav/walletsNav.js

@ -1,5 +1,6 @@
import React from 'react';
import {
Config,
copyCoinAddress,
iguanaEdexBalance,
toggleSendCoinForm,
@ -16,6 +17,9 @@ import {
class WalletsNav extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
};
this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this);
}

4
react/src/components/dashboard/walletsNav/walletsNav.render.js

@ -24,10 +24,10 @@ export const WalletsNavWithWalletRender = function () {
return (
<div>
<div
className="page-header page-header-bordered header-easydex padding-bottom-20"
className={ 'page-header page-header-bordered header-easydex ' + (this.state.nativeOnly ? 'padding-bottom-40' : 'padding-bottom-20') }
id="header-dashboard"
style={{ marginBottom: this.props.ActiveCoin.mode === 'basilisk' ? '30px' : '0' }}>
<ol className="breadcrumb">
<ol className={ this.state.nativeOnly ? 'hide' : 'breadcrumb' }>
<strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong>
{ this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' }
<button

Loading…
Cancel
Save