Browse Source

added dashboard components #2

all-modes
Petr Balashov 8 years ago
parent
commit
7380ebf2fa
  1. 40
      react/src/actions/actionCreators.js
  2. 2
      react/src/components/app/app.js
  3. 8
      react/src/components/dashboard/coinTile.js
  4. 4
      react/src/components/dashboard/coinTileItem.js
  5. 12
      react/src/components/dashboard/dashboard.js
  6. 27
      react/src/components/dashboard/navbar.js
  7. 122
      react/src/components/dashboard/walletsBalance.js
  8. 34
      react/src/components/dashboard/walletsBasiliskRefresh.js
  9. 108
      react/src/components/dashboard/walletsHeader.js
  10. 20
      react/src/components/dashboard/walletsNav.js
  11. 16
      react/src/reducers/activeCoin.js
  12. 16
      react/src/reducers/dashboard.js
  13. 5
      react/src/reducers/index.js
  14. 2
      react/www/index.html

40
react/src/actions/actionCreators.js

@ -7,6 +7,8 @@ export const DISPLAY_ADDCOIN_MODAL = 'DISPLAY_ADDCOIN_MODAL';
export const GET_ACTIVE_COINS = 'GET_ACTIVE_COINS';
export const LOGIN = 'LOGIN';
export const ACTIVE_HANDLE = 'ACTIVE_HANDLE';
export const DASHBOARD_SECTION_CHANGE = 'DASHBOARD_SECTION_CHANGE';
export const DASHBOARD_ACTIVE_COIN_CHANGE = 'DASHBOARD_ACTIVE_COIN_CHANGE';
function triggerToaster(display, message, title, _type) {
return {
@ -48,11 +50,37 @@ function iguanaWalletPassphraseState(json, dispatch) {
function iguanaActiveHandleState(json) {
return {
type: ACTIVE_HANDLE,
isLoggedIn: JSON.parse(sessionStorage.getItem('IguanaActiveAccount')).pubkey === json.pubkey && json.status === 'unlocked' ? true : false,
isLoggedIn: sessionStorage.getItem('IguanaActiveAccount') && JSON.parse(sessionStorage.getItem('IguanaActiveAccount')).pubkey === json.pubkey && json.status === 'unlocked' ? true : false,
handle: json,
}
}
function dashboardChangeSectionState(sectionName) {
return {
type: DASHBOARD_SECTION_CHANGE,
activeSection: sectionName,
}
}
export function dashboardChangeSection(sectionName) {
return dispatch => {
dispatch(dashboardChangeSectionState(sectionName));
}
}
function dashboardChangeActiveCoinState(coin) {
return {
type: DASHBOARD_SECTION_CHANGE,
coin: coin,
}
}
export function dashboardChangeActiveCoin(coin) {
return dispatch => {
dispatch(dashboardChangeSectionState(coin));
}
}
export function toggleAddcoinModal(display, isLogin) {
return dispatch => {
dispatch(toggleAddcoinModalState(display, isLogin));
@ -117,14 +145,14 @@ export function shepherdHerd(coin, mode, path) {
export function addCoinResult(coin, mode) {
const modeToValue = {
'full': 1,
'basilisk': 0,
'native': -1,
'1': 'full',
'0': 'basilisk',
'-1': 'native'
};
console.log('mode', mode);
return dispatch => {
dispatch(triggerToaster(true, coin + ' ' + translate('TOASTR.COIN_STARTED') + modeToValue[mode] + ' ' + translate('TOASTR.MODE'), translate('TOASTR.COIN_NOTIFICATION'), 'success'));
dispatch(getDexCoins());
dispatch(triggerToaster(true, coin + ' ' + translate('TOASTR.STARTED_IN') + ' ' + modeToValue[mode] + ' ' + translate('TOASTR.MODE'), translate('TOASTR.COIN_NOTIFICATION'), 'success'));
}
}

2
react/src/components/app/app.js

@ -8,6 +8,8 @@ function mapStateToProps(state) {
toaster: state.toaster,
AddCoin: state.AddCoin,
Main: state.Main,
Dashboard: state.Dashboard,
ActiveCoin: state.ActiveCoin,
};
}

8
react/src/components/dashboard/coinTile.js

@ -344,14 +344,6 @@ class CoinTile extends React.Component {
);
}
/*openDropMenu() {
this.setState(Object.assign({}, this.state, {
openDropMenu: !this.state.openDropMenu,
}));
console.log(this.state);
}*/
render() {
return (
<div className="page-aside" style={{paddingTop: '80px'}}>

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

@ -1,5 +1,7 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { dashboardChangeSection, toggleAddcoinModal } from '../../actions/actionCreators';
import Store from '../../store';
class CoinTileItem extends React.Component {
render() {
@ -8,7 +10,7 @@ class CoinTileItem extends React.Component {
return (
<div className="list-group-item col-xlg-6 col-lg-12 wallet-widgets-info" data-edexcoincode="{item.coin}">
<div className="widget widget-shadow">
<div className="widget-content text-center bg-white padding-20 edexcoin-logo" data-edexcoincode="{item.coin}" data-edexcoinmodecode="{item.modecode}" data-edexcoinname="{item.coinname}">
<div className="widget-content text-center bg-white padding-20 edexcoin-logo" data-edexcoincode="{item.coin}" data-edexcoinmodecode="{item.modecode}" data-edexcoinname="{item.coinname}" onClick={this.switchActiveCoin}>
<a className="avatar margin-bottom-5" href="javascript:void(0)" id="edexcoin-logo">
<img className="img-responsive" src={'assets/images/cryptologo/' + item.coinlogo + '.png'} alt="{item.coinname}"/>
<span className="badge up badge-{item.modecolor}" id="basfull" data-edexcoincode="{item.coin}" data-toggle="tooltip" data-placement="top" data-original-title="{item.modetip}">{item.modecode}</span>

12
react/src/components/dashboard/dashboard.js

@ -2,25 +2,29 @@ import React from 'react';
import Navbar from './navbar';
import CoinTile from './coinTile';
import EDEX from './edex';
import WalletsBalance from './walletsBalance';
import WalletsHeader from './walletsHeader';
class Dashboard extends React.Component {
constructor(props) {
super(props);
this.state = {
activePage: 'wallets',
};
this.renderDashboard = this.renderDashboard.bind(this);
}
renderDashboard() {
console.log('dash');
document.body.className = 'page-login';
return (
<div>
<Navbar {...this.props} />
<div className={this.state.activePage === 'wallets' ? 'show' : 'hide'}>
<div className={this.props.Dashboard.activeSection === 'wallets' ? 'show' : 'hide'}>
<CoinTile {...this.props} />
<WalletsBalance {...this.props.ActiveCoin} />
<WalletsHeader {...this.props.ActiveCoin} />
</div>
<div className={this.state.activePage === 'edex' ? 'show' : 'hide'}>
<div className={this.props.Dashboard.activeSection === 'edex' ? 'show' : 'hide'}>
<EDEX {...this.props} />
</div>
</div>

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

@ -1,5 +1,7 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { dashboardChangeSection, toggleAddcoinModal } from '../../actions/actionCreators';
import Store from '../../store';
class Navbar extends React.Component {
constructor(props) {
@ -8,14 +10,25 @@ class Navbar extends React.Component {
openDropMenu: false,
};
this.openDropMenu = this.openDropMenu.bind(this);
this.logout = this.logout.bind(this);
}
openDropMenu() {
this.setState(Object.assign({}, this.state, {
openDropMenu: !this.state.openDropMenu,
}));
}
toggleAddCoinModal() {
Store.dispatch(toggleAddcoinModal(true, false));
}
dashboardChangeSection(sectionName) {
Store.dispatch(dashboardChangeSection(sectionName));
}
console.log(this.state);
logout() {
// logout
}
render() {
@ -54,22 +67,22 @@ class Navbar extends React.Component {
</a>
</li>
<li className="active nav-top-menu">
<a href="javascript:void(0)" id="nav-dashboard" onClick={this.dashboard}>
<a href="javascript:void(0)" id="nav-dashboard" onClick={() => this.dashboardChangeSection('wallets')}>
<i className="site-menu-icon" aria-hidden="true"></i> {translate('INDEX.WALLETS')}
</a>
</li>
<li className="nav-top-menu">
<a href="javascript:void(0)" id="nav-easydex" onClick={this.edex}>
<a href="javascript:void(0)" id="nav-easydex" onClick={() => this.dashboardChangeSection('edex')}>
<i className="site-menu-icon" aria-hidden="true"></i> EasyDEX
</a>
</li>
<li className="nav-top-menu">
<a href="javascript:void(0)" id="nav-jumblr" onClick={this.Jumblr}>
<a href="javascript:void(0)" id="nav-jumblr" onClick={() => this.dashboardChangeSection('jumblr')}>
<i className="site-menu-icon" aria-hidden="true"></i> Jumblr
</a>
</li>
<li className="nav-top-menu">
<a href="javascript:void(0)" id="nav-iguana-atomic-explorer" onClick={this.atomic}>
<a href="javascript:void(0)" id="nav-iguana-atomic-explorer" onClick={() => this.dashboardChangeSection('atomic')}>
<i className="site-menu-icon" aria-hidden="true"></i> Atomic Explorer
</a>
</li>
@ -92,12 +105,12 @@ class Navbar extends React.Component {
</a>
<ul className="dropdown-menu" role="menu">
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" id="nav-iguana-wallet-settings" onClick={this.settings}>
<a href="javascript:void(0)" role="menuitem" id="nav-iguana-wallet-settings" onClick={() => this.dashboardChangeSection('settings')}>
<i className="icon md-settings" aria-hidden="true"></i> {translate('INDEX.SETTINGS')}
</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" id="nav-about-iguana" onClick={this.about}>
<a href="javascript:void(0)" role="menuitem" id="nav-about-iguana" onClick={() => this.dashboardChangeSection('about')}>
<i className="icon md-settings" aria-hidden="true"></i> {translate('INDEX.ABOUT_IGUANA')}
</a>
</li>

122
react/src/components/dashboard/walletsBalance.js

@ -1,91 +1,89 @@
import React from 'react';
import { translate } from '../../translate/translate';
className WalletsBalance extends React.Component {
class WalletsBalance extends React.Component {
render() {
return (
<div id="wallet-widgets" data-plugin="masonry" data-edexcoin="COIN" style={{display: 'none'}}>
<div className="col-xs-12">
if (this.props && this.props.coin) {
return (
<div id="wallet-widgets" data-plugin="masonry" data-edexcoin="COIN">
<div className="col-xs-12">
<div role="alert" className="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert" style={{display: 'none'}}>
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4 data-lang="INDEX.ACTIVATING_WALLET_RT"></h4>
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert-text" data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P1"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style="font-weight: 600"></p>
</div>
<div className="col-xs-12">
<div role="alert" className="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert">
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4>{translate('INDEX.ACTIVATING_WALLET_RT')}</h4>
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingrt-alert-text">{translate('INDEX.IGUANA_FULL_MODE_SYNC_P1')}</p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style={{fontWeight: '600'}}></p>
</div>
<div role="alert" className="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert" style={{display: 'none'}}>
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4 data-lang="INDEX.FETCHING_COIN_DATA"></h4>
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert-text" data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P1"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style="font-weight: 600"></p>
<div role="alert" className="alert alert-info alert-dismissible" data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert">
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4 data-lang="INDEX.FETCHING_COIN_DATA"></h4>
<p data-edexcoin="COIN" id="edexcoin-wallet-waitingcache-alert-text">{translate('INDEX.IGUANA_FULL_MODE_SYNC_P1')}</p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P2"></p>
<p data-lang="INDEX.IGUANA_FULL_MODE_SYNC_P3" style={{fontWeight: '600'}}></p>
</div>
</div>
</div>
<div className="col-lg-12 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_t">
<!-- EasyDEX Total Balance Widget-->
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-eye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.BALANCE"></span>
<div className="col-lg-12 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_t">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-eye font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.BALANCE')}
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style={{fontSize: '22px'}}>
<span data-edexcoin="COIN" id="edex_total_balance"></span> <span data-edexcoin="COIN" id="edex_total_balance_coincode"></span>
</span>
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px">
<span data-edexcoin="COIN" id="edex_total_balance"></span> <span data-edexcoin="COIN" id="edex_total_balance_coincode"></span>
</span>
</div>
</div>
</div>
</div>
<!-- End EasyDEX Total Balance Widget -->
</div>
<div className="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_interest" style="display: none">
<!-- EasyDEX Interest Balance Widget-->
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.INTEREST_EARNED"></span>
<div className="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_interest">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.INTEREST_EARNED')}
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style={{fontSize: '22px'}}>
<span data-edexcoin="COIN" id="edex_interest_balance"></span> <span data-edexcoin="COIN" id="edex_total_interest_coincode"></span>
</span>
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px">
<span data-edexcoin="COIN" id="edex_interest_balance"></span> <span data-edexcoin="COIN" id="edex_total_interest_coincode"></span>
</span>
</div>
</div>
</div>
</div>
<!-- End EasyDEX Interest Balance Widget -->
</div>
<div className="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_total_interest" style="display: none">
<!-- EasyDEX Total Balance Widget-->
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-bullseye font-size-24 vertical-align-bottom margin-right-5"></i><span data-lang="INDEX.TOTAL_BALANCE"></span>
<div className="col-lg-4 col-xs-12" data-edexcoin="COIN" id="edexcoin_getbalance_total_interest">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-bullseye font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.TOTAL_BALANCE')}
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style={{fontSize: '22px'}}>
<span data-edexcoin="COIN" id="edex_total_balance_interest"></span> <span data-edexcoin="COIN" id="edex_total_balance_interest_coincode"></span>
</span>
</div>
<span className="pull-right padding-top-10" data-edexcoin="COIN" style="font-size: 22px">
<span data-edexcoin="COIN" id="edex_total_balance_interest"></span> <span data-edexcoin="COIN" id="edex_total_balance_interest_coincode"></span>
</span>
</div>
</div>
</div>
</div>
<!-- End EasyDEX Total Balance Widget -->
</div>
</div>
</div>
);
);
} else {
return null;
}
}
}

34
react/src/components/dashboard/walletsBasiliskRefresh.js

@ -1,36 +1,34 @@
import React from 'react';
import { translate } from '../../translate/translate';
className WalletsBasiliskRefresh extends React.Component {
classNameName WalletsBasiliskRefresh extends React.Component {
render() {
return (
<div data-edexcoin="COIN" id="edexcoin_dashboard_basilisk_refresh_status" style="display: none">
<div class="col-xs-12 margin-top-20">
<div class="col-xs-12">
<!-- Panel Tasks -->
<div class="panel">
<div class="panel-heading">
<h3 class="panel-title" data-lang="INDEX.FETCHING_BASILISK_DATA"></h3>
<div class="panel-actions">
<a class="panel-action icon md-refresh-alt" data-toggle="panel-refresh" data-load-type="blue-only" aria-hidden="true"></a>
<div data-edexcoin="COIN" id="edexcoin_dashboard_basilisk_refresh_status">
<div className="col-xs-12 margin-top-20">
<div className="col-xs-12">
<div className="panel">
<div className="panel-heading">
<h3 className="panel-title">{translate('INDEX.FETCHING_BASILISK_DATA')}</h3>
<div className="panel-actions">
<a className="panel-action icon md-refresh-alt" data-toggle="panel-refresh" data-load-type="blue-only" aria-hidden="true"></a>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover table-striped tbl_edexcoin_dashboard_basilisk_refresh_status">
<div className="table-responsive">
<table className="table table-hover table-striped tbl_edexcoin_dashboard_basilisk_refresh_status">
<thead>
<tr>
<th data-lang="INDEX.ADDRESS"></th>
<th data-lang="INDEX.LIST_UNSPENT"></th>
<th data-lang="INDEX.LIST_TRANSACTIONS"></th>
<th data-lang="INDEX.GET_BALANCE"></th>
<th data-lang="INDEX.REFRESH"></th>
<th>{translate('INDEX.ADDRESS')}</th>
<th>{translate('INDEX.LIST_UNSPENT')}</th>
<th>{translate('INDEX.LIST_TRANSACTIONS')}</th>
<th>{translate('INDEX.GET_BALANCE')}</th>
<th>{translate('INDEX.REFRESH')}</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- End Panel Tasks -->
</div>
</div>
</div>

108
react/src/components/dashboard/walletsHeader.js

@ -0,0 +1,108 @@
import React from 'react';
import { translate } from '../../translate/translate';
//import { dashboardChangeSection, toggleAddcoinModal } from '../../actions/actionCreators';
//import Store from '../../store';
class WalletsHeader extends React.Component {
render() {
if (this.props && this.props.coin) {
return (
<div className="page-header page-header-bordered header-easydex margin-bottom-0" id="easydex-header-div">
<h1 className="page-title">EasyDEX</h1>
<ol className="breadcrumb">
<li className="header-easydex-section">{translate('INDEX.DASHBOARD')}</li>
</ol>
<div className="page-header-actions" style={{zIndex: '1'}}>
<div id="kmd_header_button">
<button type="button" id="easydex_kmd_wallet_actions_header" className="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false">
<i className="icon md-plus" aria-hidden="true"></i>
</button>
<ul className="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_kmd_wallet_actions_header" role="menu">
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_dashboard" data-lang="INDEX.DASHBOARD">{translate('INDEX.DASHBOARD')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_send">{translate('INDEX.SEND')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_recieve">{translate('INDEX.RECEIVE')}</a>
</li>
<li className="divider" role="presentation"></li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_kmd_wallet_settings">{translate('INDEX.SETTINGS')}</a>
</li>
</ul>
</div>
<div id="zec_header_button">
<button type="button" id="easydex_zec_wallet_actions_header" className="bg-yellow-600 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false">
<i className="icon md-plus" aria-hidden="true"></i>
</button>
<ul className="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_zec_wallet_actions_header" role="menu">
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_dashboard">{translate('INDEX.DASHBOARD')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_send">{translate('INDEX.SEND')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_recieve">{translate('INDEX.RECEIVE')}</a>
</li>
<li className="divider" role="presentation"></li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="ZEC" id="btn_zec_wallet_settings">{translate('INDEX.SETTINGS')}</a>
</li>
</ul>
</div>
<div id="kmd_header_button">
<button type="button" id="jumblr_actions_header" className="btn white waves-effect waves-light">
<i className="icon fa-refresh" aria-hidden="true"></i>{translate('INDEX.REFRESH')}
</button>
</div>
<div id="kmd_header_button">
<button type="button" id="easydex_acpax_wallet_actions_header" className="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light" data-toggle="dropdown" aria-expanded="false">
<i className="icon md-plus" aria-hidden="true"></i>
</button>
<ul className="dropdown-menu animate dropdown-menu-right" aria-labelledby="easydex_acpax_wallet_actions_header" role="menu">
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_dashboard">{translate('INDEX.DASHBOARD')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_send">{translate('INDEX.SEND')}</a>
</li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_recieve">{translate('INDEX.RECEIVE')}</a>
</li>
<li className="divider" role="presentation"></li>
<li role="presentation">
<a href="javascript:void(0)" role="menuitem" data-extcoin-menu="KMD" id="btn_acpax_wallet_settings">{translate('INDEX.SETTINGS')}</a>
</li>
</ul>
</div>
<div className="row no-space width-350 hidden-xs" id="easydex_btc_btcd_balances_header">
<div className="col-xs-6">
<div className="counter">
<span className="font-weight-medium" data-currency="BTC" id="header_coinname_balance"> - BTC</span>
<span className="counter-label small" data-currency="BTC" id="header_coinfiatbalance"> - USD</span>
</div>
</div>
<div className="col-xs-6">
<div className="counter">
<span className="font-weight-medium" data-currency="BTCD" id="header_coinname_balance"> - BTCD</span>
<span className="counter-label small" data-currency="BTCD" id="header_coinfiatbalance"> - USD</span>
</div>
</div>
</div>
</div>
</div>
);
} else {
return null;
}
}
}
export default WalletsHeader;

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

@ -6,10 +6,10 @@ class WalletsNav extends React.Component {
return (
<div className="page-main" id="section-dashboard" data-edexcoin="COIN">
<div className="col-xs-12 padding-top-20" id="no_wallet_selected">
<div className="alert alert-danger alert-dismissible agamainfo_alert" role="alert" style="display: none;">
<div className="alert alert-danger alert-dismissible agamainfo_alert" role="alert">
<button type="button" className="close" data-dismiss="alert" aria-label="Close">
</button>
<span style="font-size:24px; text-align: center">
<span style={{fontSize: '24px', textAlign: 'center'}}>
<i className="icon fa-exclamation-triangle" aria-hidden="true"></i> <span className="agamainfo_msgtitle">Custom Title</span>
</span>
<br/>
@ -19,27 +19,27 @@ class WalletsNav extends React.Component {
<div className="alert alert-info alert-dismissible" role="alert">
<button type="button" className="close" data-dismiss="alert" aria-label="Close">
</button>
<span style="font-size:24px; text-align: center">
<i className="icon fa-paw" aria-hidden="true"></i> <span data-lang="INDEX.NO_WALLET_CAPS"></span>
<span style={{fontSize: '24px', textAlign: 'center'}}>
<i className="icon fa-paw" aria-hidden="true"></i> {translate('INDEX.NO_WALLET_CAPS')}
</span>
<br/>
<span data-lang="INDEX.PLEASE_SELECT_A_WALLET"></span>.
{translate('INDEX.PLEASE_SELECT_A_WALLET')}.
</div>
</div>
<div className="page-header page-header-bordered header-easydex" id="header-dashboard" data-edexcoin="COIN" style="display: none">
<div className="page-header page-header-bordered header-easydex" id="header-dashboard" data-edexcoin="COIN">
<ol className="breadcrumb" data-edexcoin="COIN">
<b><span data-lang="INDEX.MY"></span> <span data-edexcoin="COIN" id="edexcoin-active">-</span> <span data-lang="INDEX.ADDRESS"></span>: </b> <span data-edexcoin="COIN" id="edexcoin_active_addr">-</span> <button className="btn btn-default btn-xs clipboard-edexaddr" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text=""><i className="icon wb-copy" aria-hidden="true"></i> <span data-lang="INDEX.COPY"></span></button>
<b>{translate('INDEX.MY')} <span data-edexcoin="COIN" id="edexcoin-active">-</span> {translate('INDEX.ADDRESS')}: </b> <span data-edexcoin="COIN" id="edexcoin_active_addr">-</span> <button className="btn btn-default btn-xs clipboard-edexaddr" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text=""><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
</ol>
<div className="page-header-actions" data-edexcoin="COIN" id="edexcoin-actions">
<div id="kmd_header_button">
<button type="button" className="btn btn-dark waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_dashboard" style="display: none">
<i className="icon md-view-dashboard" aria-hidden="true"></i> <span data-lang="INDEX.DASHBOARD"></span>
<i className="icon md-view-dashboard" aria-hidden="true"></i> {translate('INDEX.DASHBOARD')}
</button>
<button type="button" className="btn btn-primary waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_send">
<i className="icon fa-send" aria-hidden="true"></i> <span data-lang="INDEX.SEND"></span>
<i className="icon fa-send" aria-hidden="true"></i> {translate('INDEX.SEND')}
</button>
<button type="button" className="btn btn-info waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_recieve">
<i className="icon fa-inbox" aria-hidden="true"></i> <span data-lang="INDEX.RECEIVE"></span>
<i className="icon fa-inbox" aria-hidden="true"></i> {translate('INDEX.RECEIVE')}
</button>
</div>
</div>

16
react/src/reducers/activeCoin.js

@ -0,0 +1,16 @@
import { DASHBOARD_ACTIVE_COIN_CHANGE } from '../actions/actionCreators';
export function ActiveCoin(state = {
coin: null,
}, action) {
switch (action.type) {
case DASHBOARD_ACTIVE_COIN_CHANGE:
return Object.assign({}, state, {
coin: action.coin,
});
default:
return state;
}
}
export default ActiveCoin;

16
react/src/reducers/dashboard.js

@ -0,0 +1,16 @@
import { DASHBOARD_SECTION_CHANGE } from '../actions/actionCreators';
export function Dashboard(state = {
activeSection: 'wallets',
}, action) {
switch (action.type) {
case DASHBOARD_SECTION_CHANGE:
return Object.assign({}, state, {
activeSection: action.activeSection,
});
default:
return state;
}
}
export default Dashboard;

5
react/src/reducers/index.js

@ -4,12 +4,15 @@ import { routerReducer } from 'react-router-redux';
import { AddCoin } from './addcoin';
import { toaster } from './toaster';
import { Main } from './main';
//import { loader } from './loader';
import { Dashboard } from './dashboard';
import { ActiveCoin } from './activeCoin';
const rootReducer = combineReducers({
AddCoin,
toaster,
Main,
Dashboard,
ActiveCoin,
routing: routerReducer,
});

2
react/www/index.html

@ -14,7 +14,7 @@
<link rel="icon" type="image/png" href="assets/images/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="assets/images/favicon-16x16.png" sizes="16x16">
</head>
<body class="page-login layout-full page-dark">
<body id="body" class="page-login layout-full page-dark">
<div id="app"></div>
</body>
</html>

Loading…
Cancel
Save