Browse Source

Merge branch 'redux' into toaster-refactor

all-modes
petitPapillon 8 years ago
parent
commit
9f99459a03
  1. 4
      react/change.log
  2. 2
      react/src/actions/actions/settings.js
  3. 0
      react/src/components/dashboard/about/about.js
  4. 4
      react/src/components/dashboard/atomic/atomic.js
  5. 8
      react/src/components/dashboard/atomic/atomic.render.js
  6. 2
      react/src/components/dashboard/coinTile/coinTile.js
  7. 4
      react/src/components/dashboard/coinTile/coinTile.render.js
  8. 4
      react/src/components/dashboard/coinTile/coinTileItem.js
  9. 0
      react/src/components/dashboard/coinTile/coinTileItem.render.js
  10. 0
      react/src/components/dashboard/edex/edex.js
  11. 4
      react/src/components/dashboard/jumblr/jumblr.js
  12. 4
      react/src/components/dashboard/jumblr/jumblr.render.js
  13. 4
      react/src/components/dashboard/loginModal/loginModal.js
  14. 2
      react/src/components/dashboard/loginModal/loginModal.render.js
  15. 0
      react/src/components/dashboard/main/dashboard.js
  16. 32
      react/src/components/dashboard/main/dashboard.render.js
  17. 30
      react/src/components/dashboard/main/dashboard.scss
  18. 4
      react/src/components/dashboard/navbar/navbar.js
  19. 20
      react/src/components/dashboard/navbar/navbar.render.js
  20. 4
      react/src/components/dashboard/notifications/notifications.js
  21. 4
      react/src/components/dashboard/notifications/notifications.render.js
  22. 10
      react/src/components/dashboard/receiveCoin/receiveCoin.js
  23. 8
      react/src/components/dashboard/receiveCoin/receiveCoin.render.js
  24. 12
      react/src/components/dashboard/sendCoin/sendCoin.js
  25. 4
      react/src/components/dashboard/sendCoin/sendCoin.render.js
  26. 99
      react/src/components/dashboard/settings/settings.js
  27. 42
      react/src/components/dashboard/settings/settings.render.js
  28. 6
      react/src/components/dashboard/syncOnly/syncOnly.js
  29. 2
      react/src/components/dashboard/syncOnly/syncOnly.render.js
  30. 2
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  31. 2
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  32. 4
      react/src/components/dashboard/walletsBasiliskConnection/walletsBasiliskConnection.js
  33. 2
      react/src/components/dashboard/walletsBasiliskConnection/walletsBasiliskConnection.render.js
  34. 0
      react/src/components/dashboard/walletsBasiliskRefresh/walletsBasiliskRefresh.js
  35. 2
      react/src/components/dashboard/walletsBasiliskRefresh/walletsBasiliskRefresh.render.js
  36. 6
      react/src/components/dashboard/walletsCacheData/walletsCacheData.js
  37. 4
      react/src/components/dashboard/walletsCacheData/walletsCacheData.render.js
  38. 10
      react/src/components/dashboard/walletsData/walletsData.js
  39. 14
      react/src/components/dashboard/walletsData/walletsData.render.js
  40. 0
      react/src/components/dashboard/walletsHeader/walletsHeader.js
  41. 10
      react/src/components/dashboard/walletsHeader/walletsHeader.render.js
  42. 1
      react/src/components/dashboard/walletsNative/walletsNative.js
  43. 12
      react/src/components/dashboard/walletsNative/walletsNative.render.js
  44. 0
      react/src/components/dashboard/walletsNativeAlert/walletsNativeAlert.js
  45. 2
      react/src/components/dashboard/walletsNativeAlert/walletsNativeAlert.render.js
  46. 0
      react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.js
  47. 2
      react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.render.js
  48. 0
      react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js
  49. 2
      react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js
  50. 6
      react/src/components/dashboard/walletsNativeReceive/walletsNativeReceive.js
  51. 2
      react/src/components/dashboard/walletsNativeReceive/walletsNativeReceive.render.js
  52. 10
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
  53. 2
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js
  54. 16
      react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js
  55. 2
      react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.render.js
  56. 8
      react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.js
  57. 4
      react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.render.js
  58. 4
      react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.js
  59. 4
      react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.render.js
  60. 4
      react/src/components/dashboard/walletsNav/walletsNav.js
  61. 6
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  62. 6
      react/src/components/dashboard/walletsNotariesList/walletsNotariesList.js
  63. 4
      react/src/components/dashboard/walletsNotariesList/walletsNotariesList.render.js
  64. 2
      react/src/components/dashboard/walletsProgress/walletsProgress.js
  65. 2
      react/src/components/dashboard/walletsProgress/walletsProgress.render.js
  66. 4
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js
  67. 4
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js
  68. 6
      react/src/components/main/walletMain.js
  69. 2
      react/src/styles/index.scss
  70. 4
      react/src/translate/en.js

4
react/change.log

@ -1,5 +1,7 @@
v0.2.0.2a-beta v0.2.0.2a-beta
--------------
front: front:
- fixed native t to t bug that led to interest loss
- added pending request(s) spinner - added pending request(s) spinner
- added missing native z_balance api call for z-addresses - added missing native z_balance api call for z-addresses
- fixed native t to z address send bug - fixed native t to z address send bug
@ -8,6 +10,8 @@ front:
- minor UI reorder change - minor UI reorder change
- limit http stack history to 150 calls of each type - limit http stack history to 150 calls of each type
- sort http stack history desc - sort http stack history desc
- swapped gettotalbalance interest with getinfo interest
- extended settings / export keys ui
back: back:
- added cli route - added cli route

2
react/src/actions/actions/settings.js

@ -42,7 +42,7 @@ export function getAppInfo() {
export function settingsWifkeyState(json, coin) { export function settingsWifkeyState(json, coin) {
return { return {
type: GET_WIF_KEY, type: GET_WIF_KEY,
wifkey: json[`${coin}wif`], wifkey: json,
address: json[coin], address: json[coin],
} }
} }

0
react/src/components/dashboard/about.js → react/src/components/dashboard/about/about.js

4
react/src/components/dashboard/atomic.js → react/src/components/dashboard/atomic/atomic.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { atomic } from '../../actions/actionCreators'; import { atomic } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import AtomicRender from './atomic.render'; import AtomicRender from './atomic.render';

8
react/src/components/dashboard/atomic.render.js → react/src/components/dashboard/atomic/atomic.render.js

@ -1,9 +1,9 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import AddCoinOptionsCrypto from '../addcoin/addcoinOptionsCrypto'; import AddCoinOptionsCrypto from '../../addcoin/addcoinOptionsCrypto';
import AddCoinOptionsAC from '../addcoin/addcoinOptionsAC'; import AddCoinOptionsAC from '../../addcoin/addcoinOptionsAC';
import AddCoinOptionsACFiat from '../addcoin/addcoinOptionsACFiat'; import AddCoinOptionsACFiat from '../../addcoin/addcoinOptionsACFiat';
const AtomicRender = function () { const AtomicRender = function () {
return ( return (

2
react/src/components/dashboard/coinTile.js → react/src/components/dashboard/coinTile/coinTile.js

@ -2,7 +2,7 @@ import React from 'react';
import { import {
getCoinTitle, getCoinTitle,
getModeInfo getModeInfo
} from '../../util/coinHelper'; } from '../../../util/coinHelper';
import CoinTileItem from './coinTileItem'; import CoinTileItem from './coinTileItem';
import CoinTileRender from './coinTile.render'; import CoinTileRender from './coinTile.render';

4
react/src/components/dashboard/coinTile.render.js → react/src/components/dashboard/coinTile/coinTile.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const CoinTileRender = function() { const CoinTileRender = function() {
return ( return (
@ -9,7 +9,7 @@ const CoinTileRender = function() {
<i className="icon md-chevron-right"></i> <i className="icon md-chevron-right"></i>
</div> </div>
<div className="page-aside-inner"> <div className="page-aside-inner">
<div className="search-wallet-widgets panel display-none"> <div className="search-wallet-widgets panel hide">
<div className="panel-heading"> <div className="panel-heading">
<div className="panel-actions"> <div className="panel-actions">
<div className="input-search input-group-sm"> <div className="input-search input-group-sm">

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

@ -17,8 +17,8 @@ import {
getNativeTxHistory, getNativeTxHistory,
getKMDBalanceTotal, getKMDBalanceTotal,
getSyncInfoNative getSyncInfoNative
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import CoinTileItemRender from './coinTileItem.render'; import CoinTileItemRender from './coinTileItem.render';

0
react/src/components/dashboard/coinTileItem.render.js → react/src/components/dashboard/coinTile/coinTileItem.render.js

0
react/src/components/dashboard/edex.js → react/src/components/dashboard/edex/edex.js

4
react/src/components/dashboard/jumblr.js → react/src/components/dashboard/jumblr/jumblr.js

@ -1,7 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
/*import { dashboardChangeSection, toggleAddcoinModal, logout } from '../../actions/actionCreators';
import Store from '../../store';*/
import JumblrRender from './jumblr.render'; import JumblrRender from './jumblr.render';

4
react/src/components/dashboard/jumblr.render.js → react/src/components/dashboard/jumblr/jumblr.render.js

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import WalletsHeader from './walletsHeader'; import WalletsHeader from '../walletsHeader/walletsHeader';
const JumblrRender = function() { const JumblrRender = function() {
return ( return (

4
react/src/components/dashboard/loginModal.js → react/src/components/dashboard/loginModal/loginModal.js

@ -2,8 +2,8 @@ import React from 'react';
import { import {
toggleAddcoinModal, toggleAddcoinModal,
iguanaWalletPassphrase iguanaWalletPassphrase
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import LoginModalRender from './loginModal.render'; import LoginModalRender from './loginModal.render';

2
react/src/components/dashboard/loginModal.render.js → react/src/components/dashboard/loginModal/loginModal.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const LoginModalRender = function () { const LoginModalRender = function () {
return ( return (

0
react/src/components/dashboard/dashboard.js → react/src/components/dashboard/main/dashboard.js

32
react/src/components/dashboard/dashboard.render.js → react/src/components/dashboard/main/dashboard.render.js

@ -1,21 +1,21 @@
import React from 'react'; import React from 'react';
import Navbar from './navbar'; import Navbar from '../navbar/navbar';
import CoinTile from './coinTile'; import CoinTile from '../coinTile/coinTile';
import EDEX from './edex'; import EDEX from '../edex/edex';
import WalletsBalance from './walletsBalance'; import WalletsBalance from '../walletsBalance/walletsBalance';
import WalletsProgress from './walletsProgress'; import WalletsProgress from '../walletsProgress/walletsProgress';
import WalletsNav from './walletsNav'; import WalletsNav from '../walletsNav/walletsNav';
import SendCoin from './sendCoin'; import SendCoin from '../sendCoin/sendCoin';
import WalletsData from './walletsData'; import WalletsData from '../walletsData/walletsData';
import Atomic from './atomic'; import Atomic from '../atomic/atomic';
import Jumblr from './jumblr'; import Jumblr from '../jumblr/jumblr';
import Settings from './settings'; import Settings from '../settings/settings';
import ReceiveCoin from './receiveCoin'; import ReceiveCoin from '../receiveCoin/receiveCoin';
import About from './about'; import About from '../about/about';
import WalletsNative from './walletsNative'; import WalletsNative from '../walletsNative/walletsNative';
import WalletsNativeTxInfo from './walletsNativeTxInfo'; import WalletsNativeTxInfo from '../walletsNativeTxInfo/walletsNativeTxInfo';
import WalletsTxInfo from './walletsTxInfo'; import WalletsTxInfo from '../walletsTxInfo/walletsTxInfo';
const DashboardRender = function() { const DashboardRender = function() {
return ( return (

30
react/src/components/dashboard/dashboard.scss → react/src/components/dashboard/main/dashboard.scss

@ -6,31 +6,27 @@
text-align: center; text-align: center;
} }
.display-none {
display: none !important;
}
.margin-top-30 { .margin-top-30 {
margin-top: 30px; margin-top: 30px;
} }
// jumblr.js // jumblr.js
.jumblr-header { .jumblr-header {
font-size: 24px; font-size: 24px;
text-align: center; text-align: center;
} }
// loginModal.js // loginModal.js
.color-white { .color-white {
color: #fff; color: #fff;
} }
//navbar.js // navbar.js
.navbar-toolbar > li > a.padding-top-16 { .navbar-toolbar > li > a.padding-top-16 {
padding-top: 16px; padding-top: 16px;
} }
//notifications.js // notifications.js
.modal-body-container { .modal-body-container {
height: 590px; height: 590px;
} }
@ -40,7 +36,7 @@
overflow-y: scroll; overflow-y: scroll;
} }
//sendCoin.js // sendCoin.js
.vertical-padding-10 { .vertical-padding-10 {
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
@ -55,7 +51,7 @@
color: #f44336; color: #f44336;
} }
//settings.js // settings.js
.wallet-info-key { .wallet-info-key {
font-weight: bold; font-weight: bold;
} }
@ -68,7 +64,7 @@
text-align: left; text-align: left;
} }
//walletsBalance.js // walletsBalance.js
.font-weight-600 { .font-weight-600 {
font-weight: 600; font-weight: 600;
} }
@ -77,7 +73,7 @@
font-size: 22px; font-size: 22px;
} }
//walletBasiliskConnection.js // walletBasiliskConnection.js
.wallet-send-header { .wallet-send-header {
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
} }
@ -94,7 +90,7 @@
font-size: 80%; font-size: 80%;
} }
//walletsData.js // walletsData.js
.z-index-10 { .z-index-10 {
z-index: 10; z-index: 10;
} }
@ -107,12 +103,12 @@
padding: 20px 0 10px 0; padding: 20px 0 10px 0;
} }
//walletsHeader.js // walletsHeader.js
.z-index-1 { .z-index-1 {
z-index: 1; z-index: 1;
} }
//walletsNative.js // walletsNative.js
.background-color-white { .background-color-white {
background-color: #fff; background-color: #fff;
} }
@ -122,12 +118,12 @@
vertical-align: middle; vertical-align: middle;
} }
//walletsNativeSyncProgress.js // walletsNativeSyncProgress.js
.sync-progress-container { .sync-progress-container {
margin: -20px 0px 10px 0px; margin: -20px 0px 10px 0px;
} }
//walletsNativeTxInfo.js // walletsNativeTxInfo.js
.height-170 { .height-170 {
height: 170px; height: 170px;
} }

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

@ -7,8 +7,8 @@ import {
toggleSyncOnlyModal, toggleSyncOnlyModal,
getSyncOnlyForks, getSyncOnlyForks,
logout logout
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import NavbarRender from './navbar.render'; import NavbarRender from './navbar.render';

20
react/src/components/dashboard/navbar.render.js → react/src/components/dashboard/navbar/navbar.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const NavbarRender = function() { const NavbarRender = function() {
return ( return (
@ -30,7 +30,7 @@ const NavbarRender = function() {
<div className="navbar-container container-fluid"> <div className="navbar-container container-fluid">
<div className="collapse navbar-collapse navbar-collapse-toolbar"> <div className="collapse navbar-collapse navbar-collapse-toolbar">
<ul className="nav navbar-toolbar"> <ul className="nav navbar-toolbar">
<li className="hidden-float display-none"> <li className="hidden-float hide">
<a> <a>
<i className="icon hamburger hamburger-arrow-left"> <i className="icon hamburger hamburger-arrow-left">
<span className="sr-only">{ translate('INDEX.TOGGLE_MENUBAR') }</span> <span className="sr-only">{ translate('INDEX.TOGGLE_MENUBAR') }</span>
@ -48,7 +48,7 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> EasyDEX <i className="site-menu-icon"></i> EasyDEX
</a> </a>
</li> </li>
<li className={ 'display-none ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }> <li className={ 'hide ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('jumblr') }> <a onClick={ () => this.dashboardChangeSection('jumblr') }>
<i className="site-menu-icon"></i> Jumblr <i className="site-menu-icon"></i> Jumblr
</a> </a>
@ -64,19 +64,19 @@ const NavbarRender = function() {
<a <a
className="pointer padding-bottom-10 padding-top-16" className="pointer padding-bottom-10 padding-top-16"
onClick={ this.toggleAddCoinModal }> onClick={ this.toggleAddCoinModal }>
<span> <span>
<img src="assets/images/icons/activatecoin.png" alt={ translate('INDEX.ADD_COIN') } /> <img src="assets/images/icons/activatecoin.png" alt={ translate('INDEX.ADD_COIN') } />
</span> </span>
</a> </a>
</li> </li>
<li <li
className={ 'pointer dropdown' + (this.state.openDropMenu ? ' open' : '') } className={ 'pointer dropdown' + (this.state.openDropMenu ? ' open' : '') }
onClick={ this.openDropMenu }> onClick={ this.openDropMenu }>
<a className="navbar-avatar dropdown-toggle"> <a className="navbar-avatar dropdown-toggle">
<span className="avatar avatar-online"> <span className="avatar avatar-online">
<img src="assets/images/iguana_profile_02.jpg" alt="iguana profile pic" /> <img src="assets/images/iguana_profile_02.jpg" alt="iguana profile pic" />
<i></i> <i></i>
</span> </span>
</a> </a>
<ul className="dropdown-menu"> <ul className="dropdown-menu">
<li> <li>

4
react/src/components/dashboard/notifications.js → react/src/components/dashboard/notifications/notifications.js

@ -1,7 +1,5 @@
import React from 'react'; import React from 'react';
import { sortByDate } from '../../../util/sort';
import { sortByDate } from '../../util/sort';
import { import {
NotificationsByTypeRender, NotificationsByTypeRender,
NotificationsModalRender, NotificationsModalRender,

4
react/src/components/dashboard/notifications.render.js → react/src/components/dashboard/notifications/notifications.render.js

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { import {
secondsToString secondsToString
} from '../../util/time'; } from '../../../util/time';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const NotificationsByTypeRender = function(logItem, type, index) { export const NotificationsByTypeRender = function(logItem, type, index) {
return ( return (

10
react/src/components/dashboard/receiveCoin.js → react/src/components/dashboard/receiveCoin/receiveCoin.js

@ -3,8 +3,8 @@ import {
copyCoinAddress, copyCoinAddress,
checkAddressBasilisk, checkAddressBasilisk,
validateAddressBasilisk validateAddressBasilisk
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
AddressActionsBasiliskModeRender, AddressActionsBasiliskModeRender,
@ -62,10 +62,12 @@ class ReceiveCoin extends React.Component {
for (let i = 0; i < this.props.addresses.public.length; i++) { for (let i = 0; i < this.props.addresses.public.length; i++) {
let address = this.props.addresses.public[i]; let address = this.props.addresses.public[i];
if (this.isBasiliskMode() && this.hasNoAmount(address)) { if (this.isBasiliskMode() &&
this.hasNoAmount(address)) {
address.amount = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.balance ? this.props.cache[this.props.coin][address.address].getbalance.data.balance : 'N/A'; address.amount = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.balance ? this.props.cache[this.props.coin][address.address].getbalance.data.balance : 'N/A';
} }
if (this.isBasiliskMode() && this.hasNoInterest(address)) { if (this.isBasiliskMode() &&
this.hasNoInterest(address)) {
address.interest = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.interest ? this.props.cache[this.props.coin][address.address].getbalance.data.interest : 'N/A'; address.interest = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.interest ? this.props.cache[this.props.coin][address.address].getbalance.data.interest : 'N/A';
} }

8
react/src/components/dashboard/receiveCoin.render.js → react/src/components/dashboard/receiveCoin/receiveCoin.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const AddressActionsBasiliskModeRender = function(address) { export const AddressActionsBasiliskModeRender = function(address) {
return ( return (
@ -27,7 +27,7 @@ export const AddressActionsBasiliskModeRender = function(address) {
); );
}; };
export const AddressActionsNonBasiliskModeRender = function (address) { export const AddressActionsNonBasiliskModeRender = function(address) {
return ( return (
<td> <td>
<span className="label label-default"> <span className="label label-default">
@ -40,7 +40,7 @@ export const AddressActionsNonBasiliskModeRender = function (address) {
); );
}; };
export const AddressItemRender = function (address) { export const AddressItemRender = function(address) {
return ( return (
<tr key={ address.address }> <tr key={ address.address }>
{ this.renderAddressActions(address.address) } { this.renderAddressActions(address.address) }
@ -51,7 +51,7 @@ export const AddressItemRender = function (address) {
); );
}; };
export const ReceiveCoinRender = function () { export const ReceiveCoinRender = function() {
return ( return (
<div> <div>
<div className="col-xs-12 margin-top-20"> <div className="col-xs-12 margin-top-20">

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

@ -1,13 +1,13 @@
import React from 'react'; import React from 'react';
import Config from '../../config'; import Config from '../../../config';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { import {
checkTimestamp checkTimestamp
} from '../../util/time'; } from '../../../util/time';
import { import {
edexGetTxIDList, edexGetTxIDList,
edexRemoveTXID edexRemoveTXID
} from '../../util/cacheFormat'; } from '../../../util/cacheFormat';
import { import {
resolveOpenAliasAddress, resolveOpenAliasAddress,
triggerToaster, triggerToaster,
@ -21,8 +21,8 @@ import {
clearLastSendToResponseState, clearLastSendToResponseState,
sendToAddressStateAlt, sendToAddressStateAlt,
dexSendRawTX dexSendRawTX
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
UTXOCacheInfoRender, UTXOCacheInfoRender,
SendCoinResponseRender, SendCoinResponseRender,

4
react/src/components/dashboard/sendCoin.render.js → react/src/components/dashboard/sendCoin/sendCoin.render.js

@ -1,9 +1,9 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { import {
secondsElapsedToString, secondsElapsedToString,
secondsToString secondsToString
} from '../../util/time'; } from '../../../util/time';
export const UTXOCacheInfoRender = function(refreshCacheData, isReadyToUpdate, waitUntilCallIsFinished, timestamp) { export const UTXOCacheInfoRender = function(refreshCacheData, isReadyToUpdate, waitUntilCallIsFinished, timestamp) {
return ( return (

99
react/src/components/dashboard/settings.js → react/src/components/dashboard/settings/settings.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { import {
iguanaActiveHandle, iguanaActiveHandle,
encryptWallet, encryptWallet,
@ -12,8 +12,8 @@ import {
saveAppConfig, saveAppConfig,
getAppInfo, getAppInfo,
shepherdCli shepherdCli
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
AppInfoTabRender, AppInfoTabRender,
@ -26,7 +26,6 @@ import {
2) add fiat section 2) add fiat section
3) kickstart section 3) kickstart section
4) batch export/import wallet addresses 4) batch export/import wallet addresses
5) export keys, add coin selector
*/ */
class Settings extends React.Component { class Settings extends React.Component {
constructor(props) { constructor(props) {
@ -41,6 +40,8 @@ class Settings extends React.Component {
cliCmdString: null, cliCmdString: null,
cliCoin: null, cliCoin: null,
cliResponse: null, cliResponse: null,
exportWifKeysRaw: false,
seedInputVisibility: false,
}; };
this.exportWifKeys = this.exportWifKeys.bind(this); this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this); this.updateInput = this.updateInput.bind(this);
@ -52,6 +53,8 @@ class Settings extends React.Component {
this.renderPeersList = this.renderPeersList.bind(this); this.renderPeersList = this.renderPeersList.bind(this);
this.renderSNPeersList = this.renderSNPeersList.bind(this); this.renderSNPeersList = this.renderSNPeersList.bind(this);
this._saveAppConfig = this._saveAppConfig.bind(this); this._saveAppConfig = this._saveAppConfig.bind(this);
this.exportWifKeysRaw = this.exportWifKeysRaw.bind(this);
this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this);
} }
componentDidMount() { componentDidMount() {
@ -72,6 +75,12 @@ class Settings extends React.Component {
} }
} }
toggleSeedInputVisibility() {
this.setState({
seedInputVisibility: !this.state.seedInputVisibility,
});
}
execCliCmd() { execCliCmd() {
Store.dispatch(shepherdCli('passthru', this.state.cliCoin, this.state.cliCmd)); Store.dispatch(shepherdCli('passthru', this.state.cliCoin, this.state.cliCmd));
} }
@ -114,12 +123,14 @@ class Settings extends React.Component {
renderPeersList() { renderPeersList() {
if (this.state.getPeersCoin) { if (this.state.getPeersCoin) {
const coin = this.state.getPeersCoin.split('|')[0]; const _getPeersCoin = this.state.getPeersCoin;
const _rawPeers = this.props.Settings.rawPeers;
if (this.props.Settings.rawPeers && const coin = _getPeersCoin.split('|')[0];
this.state.getPeersCoin &&
this.props.Settings.rawPeers[coin]) { if (_rawPeers &&
return this.props.Settings.rawPeers[coin].map((ip) => _getPeersCoin &&
_rawPeers[coin]) {
return _rawPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div> <div key={ ip }>{ ip }</div>
); );
} else { } else {
@ -142,12 +153,14 @@ class Settings extends React.Component {
renderSNPeersList() { renderSNPeersList() {
if (this.state.getPeersCoin) { if (this.state.getPeersCoin) {
const coin = this.state.getPeersCoin.split('|')[0]; const _getPeersCoin = this.state.getPeersCoin;
const _supernetPeers = this.props.Settings.supernetPeers;
if (this.props.Settings.supernetPeers && const coin = _getPeersCoin.split('|')[0];
this.state.getPeersCoin &&
this.props.Settings.supernetPeers[coin]) { if (_supernetPeers &&
return this.props.Settings.supernetPeers[coin].map((ip) => _getPeersCoin &&
_supernetPeers[coin]) {
return _supernetPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div> <div key={ ip }>{ ip }</div>
); );
} else { } else {
@ -331,6 +344,60 @@ class Settings extends React.Component {
} }
} }
renderExportWifKeysRaw() {
const _wifKeysResponse = this.props.Settings.wifkey;
if (_wifKeysResponse &&
this.state.exportWifKeysRaw) {
return (
<div className="padding-bottom-30 padding-top-30">{ JSON.stringify(_wifKeysResponse, null, '\t') }</div>
);
} else {
return null;
}
}
renderWifKeys() {
let items = [];
if (this.props.Settings.wifkey) {
const _wifKeys = this.props.Settings.wifkey;
for (let i = 0; i < 2; i++) {
items.push(
<tr key={ `wif-export-table-header-${i}` }>
<td className="padding-bottom-10 padding-top-10">
<strong>{ i === 0 ? 'Address list' : 'Wif key list' }</strong>
</td>
<td className="padding-bottom-10 padding-top-10"></td>
</tr>
);
for (let _key in _wifKeys) {
if ((i === 0 && _key.length === 3 && _key !== 'tag') ||
(i === 1 && _key.indexOf('wif') > -1)) {
items.push(
<tr key={ _key }>
<td>{ _key }</td>
<td className="padding-left-15">{ _wifKeys[_key] }</td>
</tr>
);
}
}
}
return items;
} else {
return null;
}
}
exportWifKeysRaw() {
this.setState(Object.assign({}, this.state, {
exportWifKeysRaw: !this.state.exportWifKeysRaw,
}));
}
render() { render() {
return SettingsRender.call(this); return SettingsRender.call(this);
} }

42
react/src/components/dashboard/settings.render.js → react/src/components/dashboard/settings/settings.render.js

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import AddCoinOptionsCrypto from '../addcoin/addcoinOptionsCrypto'; import AddCoinOptionsCrypto from '../../addcoin/addcoinOptionsCrypto';
import AddCoinOptionsAC from '../addcoin/addcoinOptionsAC'; import AddCoinOptionsAC from '../../addcoin/addcoinOptionsAC';
import AddCoinOptionsACFiat from '../addcoin/addcoinOptionsACFiat'; import AddCoinOptionsACFiat from '../../addcoin/addcoinOptionsACFiat';
export const AppInfoTabRender = function() { export const AppInfoTabRender = function() {
return ( return (
@ -278,7 +278,10 @@ export const SettingsRender = function() {
style={{ height: this.state.activeTab === 4 ? this.state.activeTabHeight + 'px' : '0' }}> style={{ height: this.state.activeTab === 4 ? this.state.activeTabHeight + 'px' : '0' }}>
<div className="panel-body"> <div className="panel-body">
<p> <p>
<div>{ this.renderLB('INDEX.ONLY_ACTIVE_WIF_KEYS') }</div><br/> <div className="padding-bottom-20">{ this.renderLB('INDEX.ONLY_ACTIVE_WIF_KEYS') }</div>
<div className="padding-bottom-20">
<i>{ this.renderLB('SETTINGS.EXPORT_KEYS_NOTE') }</i>
</div>
<strong> <strong>
<i>{ translate('INDEX.PLEASE_KEEP_KEYS_SAFE') }</i> <i>{ translate('INDEX.PLEASE_KEEP_KEYS_SAFE') }</i>
</strong> </strong>
@ -287,11 +290,14 @@ export const SettingsRender = function() {
<form className="wifkeys-form" method="post" action="javascript:" autoComplete="off"> <form className="wifkeys-form" method="post" action="javascript:" autoComplete="off">
<div className="form-group form-material floating"> <div className="form-group form-material floating">
<input <input
type="password" type={ this.state.seedInputVisibility ? 'text' : 'password' }
className="form-control" className="form-control"
name="wifkeysPassphrase" name="wifkeysPassphrase"
id="wifkeysPassphrase" id="wifkeysPassphrase"
onChange={ this.updateInput } /> onChange={ this.updateInput } />
<i
className={ this.state.seedInputVisibility ? 'seed-toggle fa fa-eye-slash' : 'seed-toggle fa fa-eye' }
onClick={ this.toggleSeedInputVisibility }></i>
<label className="floating-label" htmlFor="wifkeysPassphrase">{ translate('INDEX.PASSPHRASE') }</label> <label className="floating-label" htmlFor="wifkeysPassphrase">{ translate('INDEX.PASSPHRASE') }</label>
</div> </div>
<div className="col-sm-12 col-xs-12 text-align-center"> <div className="col-sm-12 col-xs-12 text-align-center">
@ -304,20 +310,18 @@ export const SettingsRender = function() {
<div className="col-sm-12 padding-top-15"> <div className="col-sm-12 padding-top-15">
<div className="row"> <div className="row">
<table className={ this.props.Settings && this.props.Settings.address ? 'table show' : 'table hide' }> <table className="table">
<tr> { this.renderWifKeys() }
<td>
<strong>{ this.props.ActiveCoin.coin }</strong>
</td>
<td className="padding-left-15">{ this.props.Settings.address }</td>
</tr>
<tr>
<td>
<strong>{ this.props.ActiveCoin.coin }Wif</strong>
</td>
<td className="padding-left-15">{ this.props.Settings.wifkey }</td>
</tr>
</table> </table>
<div className={ this.props.Settings.wifkey ? 'col-sm-12 col-xs-12 text-align-center' : 'hide' }>
<button
type="button"
className="btn btn-primary waves-effect waves-light"
onClick={ this.exportWifKeysRaw }>{ this.state.exportWifKeysRaw ? 'Hide' : 'Show' } raw data</button>
</div>
<div className={ this.state.exportWifKeysRaw ? 'col-sm-12 col-xs-12 text-align-center' : 'hide' }>
{ this.renderExportWifKeysRaw() }
</div>
</div> </div>
</div> </div>
</div> </div>

6
react/src/components/dashboard/syncOnly.js → react/src/components/dashboard/syncOnly/syncOnly.js

@ -1,13 +1,13 @@
import React from 'react'; import React from 'react';
import { getCoinTitle } from '../../util/coinHelper'; import { getCoinTitle } from '../../../util/coinHelper';
import { import {
stopInterval, stopInterval,
addCoin, addCoin,
toggleSyncOnlyModal, toggleSyncOnlyModal,
stopIguanaFork, stopIguanaFork,
restartIguanaInstance restartIguanaInstance
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
ProgressRender, ProgressRender,

2
react/src/components/dashboard/syncOnly.render.js → react/src/components/dashboard/syncOnly/syncOnly.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const ProgressRender = function (fork) { export const ProgressRender = function (fork) {
return ( return (

2
react/src/components/dashboard/walletsBalance.js → react/src/components/dashboard/walletsBalance/walletsBalance.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import WalletsBalanceRender from './walletsBalance.render'; import WalletsBalanceRender from './walletsBalance.render';

2
react/src/components/dashboard/walletsBalance.render.js → react/src/components/dashboard/walletsBalance/walletsBalance.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsBalanceRender = function() { const WalletsBalanceRender = function() {
return ( return (

4
react/src/components/dashboard/walletsBasiliskConnection.js → react/src/components/dashboard/walletsBasiliskConnection/walletsBasiliskConnection.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { basiliskConnection } from '../../actions/actionCreators'; import { basiliskConnection } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import WalletsBasiliskConnectionRender from './walletsBasiliskConnection.render'; import WalletsBasiliskConnectionRender from './walletsBasiliskConnection.render';
class WalletsBasiliskConnection extends React.Component { class WalletsBasiliskConnection extends React.Component {

2
react/src/components/dashboard/walletsBasiliskConnection.render.js → react/src/components/dashboard/walletsBasiliskConnection/walletsBasiliskConnection.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsBasiliskConnectionRender = function() { const WalletsBasiliskConnectionRender = function() {
return ( return (

0
react/src/components/dashboard/walletsBasiliskRefresh.js → react/src/components/dashboard/walletsBasiliskRefresh/walletsBasiliskRefresh.js

2
react/src/components/dashboard/walletsBasiliskRefresh.render.js → react/src/components/dashboard/walletsBasiliskRefresh/walletsBasiliskRefresh.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsBasiliskRefreshRender = function() { const WalletsBasiliskRefreshRender = function() {
return ( return (

6
react/src/components/dashboard/walletsCacheData.js → react/src/components/dashboard/walletsCacheData/walletsCacheData.js

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
import { toggleViewCacheModal } from '../../actions/actionCreators'; import { toggleViewCacheModal } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { TreeNode } from 'rc-tree'; import { TreeNode } from 'rc-tree';
import WalletsCacheDataRender from './walletsCacheData.render'; import WalletsCacheDataRender from './walletsCacheData.render';

4
react/src/components/dashboard/walletsCacheData.render.js → react/src/components/dashboard/walletsCacheData/walletsCacheData.render.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { animation } from '../../util/rc-tree-animate'; import { animation } from '../../../util/rc-tree-animate';
import { TreeNode } from 'rc-tree'; import { TreeNode } from 'rc-tree';
const WalletsCacheDataRender = function() { const WalletsCacheDataRender = function() {

10
react/src/components/dashboard/walletsData.js → react/src/components/dashboard/walletsData/walletsData.js

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import Config from '../../config'; import Config from '../../../config';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { sortByDate } from '../../util/sort'; import { sortByDate } from '../../../util/sort';
import { import {
basiliskRefresh, basiliskRefresh,
basiliskConnection, basiliskConnection,
@ -17,8 +17,8 @@ import {
deleteCacheFile, deleteCacheFile,
fetchNewCacheData, fetchNewCacheData,
fetchUtxoCache fetchUtxoCache
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
PaginationItemRender, PaginationItemRender,
PaginationItemsPerPageSelectorRender, PaginationItemsPerPageSelectorRender,

14
react/src/components/dashboard/walletsData.render.js → react/src/components/dashboard/walletsData/walletsData.render.js

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import WalletsBasiliskRefresh from './walletsBasiliskRefresh'; import WalletsBasiliskRefresh from '../walletsBasiliskRefresh/walletsBasiliskRefresh';
import WalletsBasiliskConnection from './walletsBasiliskConnection'; import WalletsBasiliskConnection from '../walletsBasiliskConnection/walletsBasiliskConnection';
import WalletsNotariesList from './walletsNotariesList'; import WalletsNotariesList from '../walletsNotariesList/walletsNotariesList';
import WalletsCacheData from './walletsCacheData'; import WalletsCacheData from '../walletsCacheData/walletsCacheData';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
export const PaginationItemRender = function(i) { export const PaginationItemRender = function(i) {
return ( return (
@ -171,7 +171,7 @@ export const WalletsDataRender = function() {
<i className="icon fa-history"></i> { translate('INDEX.REFETCH_WALLET_DATA') } <i className="icon fa-history"></i> { translate('INDEX.REFETCH_WALLET_DATA') }
</a> </a>
</li> </li>
<li className={ 'display-none ' + (!this.state.useCache ? 'hide' : '') }> <li className={ 'hide ' + (!this.state.useCache ? 'hide' : '') }>
<a onClick={ this.restartBasiliskInstance }> <a onClick={ this.restartBasiliskInstance }>
<i className="icon fa-refresh"></i> Restart Basilisk Instance (unsafe!) <i className="icon fa-refresh"></i> Restart Basilisk Instance (unsafe!)
</a> </a>

0
react/src/components/dashboard/walletsHeader.js → react/src/components/dashboard/walletsHeader/walletsHeader.js

10
react/src/components/dashboard/walletsHeader.render.js → react/src/components/dashboard/walletsHeader/walletsHeader.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsHeaderRender = function() { const WalletsHeaderRender = function() {
return ( return (
@ -14,7 +14,7 @@ const WalletsHeaderRender = function() {
<img src="assets/images/native/jumblr_header_title_logo.png" /><br /> { translate('SIDEBAR.JUMBLR_MOTTO') } <img src="assets/images/native/jumblr_header_title_logo.png" /><br /> { translate('SIDEBAR.JUMBLR_MOTTO') }
</li> </li>
</ol> </ol>
<div className="page-header-actions z-index-1 display-none"> <div className="page-header-actions z-index-1 hide">
<div id="kmd_header_button"> <div id="kmd_header_button">
<button <button
type="button" type="button"
@ -38,7 +38,7 @@ const WalletsHeaderRender = function() {
</ul> </ul>
</div> </div>
<div id="zec_header_button" className="display-none"> <div id="zec_header_button" className="hide">
<button <button
type="button" type="button"
className="bg-yellow-600 btn btn-floating white waves-effect waves-float waves-light"> className="bg-yellow-600 btn btn-floating white waves-effect waves-float waves-light">
@ -69,7 +69,7 @@ const WalletsHeaderRender = function() {
</button> </button>
</div> </div>
<div id="kmd_header_button" className="display-none"> <div id="kmd_header_button" className="hide">
<button <button
type="button" type="button"
className="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light"> className="bg-teal-500 btn btn-floating white waves-effect waves-float waves-light">
@ -92,7 +92,7 @@ const WalletsHeaderRender = function() {
</ul> </ul>
</div> </div>
<div className="row no-space width-350 hidden-xs display-none"> <div className="row no-space width-350 hidden-xs hide">
<div className="col-xs-6"> <div className="col-xs-6">
<div className="counter"> <div className="counter">
<span className="font-weight-medium"> - BTC</span> <span className="font-weight-medium"> - BTC</span>

1
react/src/components/dashboard/walletsNative.js → react/src/components/dashboard/walletsNative/walletsNative.js

@ -20,7 +20,6 @@ class WalletsNative extends React.Component {
this.props.ActiveCoin.mode === 'native'; this.props.ActiveCoin.mode === 'native';
} }
// <WalletsNativeAlert {...this.props} />
render() { render() {
if (this.isActiveCoinModeNative()) { if (this.isActiveCoinModeNative()) {
return WalletsNativeRender.call(this); return WalletsNativeRender.call(this);

12
react/src/components/dashboard/walletsNative.render.js → react/src/components/dashboard/walletsNative/walletsNative.render.js

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import WalletsNativeBalance from './walletsNativeBalance'; import WalletsNativeBalance from '../walletsNativeBalance/walletsNativeBalance';
import WalletsNativeInfo from './walletsNativeInfo'; import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo';
import WalletsNativeReceive from './walletsNativeReceive'; import WalletsNativeReceive from '../walletsNativeReceive/walletsNativeReceive';
import WalletsNativeSend from './walletsNativeSend'; import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend';
import WalletsNativeSyncProgress from './walletsNativeSyncProgress'; import WalletsNativeSyncProgress from '../walletsNativeSyncProgress/walletsNativeSyncProgress';
import WalletsNativeTxHistory from './walletsNativeTxHistory'; import WalletsNativeTxHistory from '../walletsNativeTxHistory/walletsNativeTxHistory';
const WalletsNativeRender = function() { const WalletsNativeRender = function() {
return ( return (

0
react/src/components/dashboard/walletsNativeAlert.js → react/src/components/dashboard/walletsNativeAlert/walletsNativeAlert.js

2
react/src/components/dashboard/walletsNativeAlert.render.js → react/src/components/dashboard/walletsNativeAlert/walletsNativeAlert.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsNativeAlertRender = function() { const WalletsNativeAlertRender = function() {
return ( return (

0
react/src/components/dashboard/walletsNativeBalance.js → react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.js

2
react/src/components/dashboard/walletsNativeBalance.render.js → react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsNativeBalanceRender = function() { const WalletsNativeBalanceRender = function() {
return ( return (

0
react/src/components/dashboard/walletsNativeInfo.js → react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js

2
react/src/components/dashboard/walletsNativeInfo.render.js → react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsNativeInfoRender = function() { const WalletsNativeInfoRender = function() {
return ( return (

6
react/src/components/dashboard/walletsNativeReceive.js → react/src/components/dashboard/walletsNativeReceive/walletsNativeReceive.js

@ -2,8 +2,8 @@ import React from 'react';
import { import {
copyCoinAddress, copyCoinAddress,
getNewKMDAddresses getNewKMDAddresses
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
AddressListRender, AddressListRender,
WalletsNativeReceiveRender WalletsNativeReceiveRender
@ -66,7 +66,7 @@ class WalletsNativeReceive extends React.Component {
if (this.props && if (this.props &&
this.props.ActiveCoin && this.props.ActiveCoin &&
this.props.ActiveCoin.nativeActiveSection === 'receive') { this.props.ActiveCoin.nativeActiveSection === 'receive') {
WalletsNativeReceiveRender.call(this); return WalletsNativeReceiveRender.call(this);
} }
return null; return null;

2
react/src/components/dashboard/walletsNativeReceive.render.js → react/src/components/dashboard/walletsNativeReceive/walletsNativeReceive.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const AddressListRender = function(address, type) { export const AddressListRender = function(address, type) {
return ( return (

10
react/src/components/dashboard/walletsNativeSend.js → react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js

@ -1,14 +1,14 @@
import React from 'react'; import React from 'react';
import Config from '../../config'; import Config from '../../../config';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
import { import {
resolveOpenAliasAddress, resolveOpenAliasAddress,
triggerToaster, triggerToaster,
sendNativeTx, sendNativeTx,
getKMDOPID getKMDOPID
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
AddressListRender, AddressListRender,
OASendUIRender, OASendUIRender,

2
react/src/components/dashboard/walletsNativeSend.render.js → react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const AddressListRender = function() { export const AddressListRender = function() {
return ( return (

16
react/src/components/dashboard/walletsNativeSyncProgress.js → react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { import {
ChainActivationNotificationRender, ChainActivationNotificationRender,
WalletsNativeSyncProgressRender WalletsNativeSyncProgressRender
@ -37,7 +37,7 @@ class WalletsNativeSyncProgress extends React.Component {
if (this.props.Settings && if (this.props.Settings &&
this.props.Settings.debugLog) { this.props.Settings.debugLog) {
if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1) { if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1) {
let temp = this.props.Settings.debugLog.split(' '); const temp = this.props.Settings.debugLog.split(' ');
let currentBestChain; let currentBestChain;
let currentProgress; let currentProgress;
@ -61,6 +61,18 @@ class WalletsNativeSyncProgress extends React.Component {
`: ${Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks)}% (blocks ${currentBestChain} / ${this.props.Dashboard.progress.remoteKMDNode.blocks})` `: ${Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks)}% (blocks ${currentBestChain} / ${this.props.Dashboard.progress.remoteKMDNode.blocks})`
); );
} }
} else if (this.props.Settings.debugLog.indexOf('Still rescanning') > -1) {
const temp = this.props.Settings.debugLog.split(' ');
for (let i = 0; i < temp.length; i++) {
if (temp[i].indexOf('Progress=') > -1) {
currentProgress = Number(temp[i].replace('Progress=', '')) * 100;
}
}
return (
`: ${currentProgress}%`
);
} else { } else {
return ( return (
<span>...</span> <span>...</span>

2
react/src/components/dashboard/walletsNativeSyncProgress.render.js → react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const ChainActivationNotificationRender = function() { export const ChainActivationNotificationRender = function() {
return ( return (

8
react/src/components/dashboard/walletsNativeTxHistory.js → react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.js

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { sortByDate } from '../../util/sort'; import { sortByDate } from '../../../util/sort';
import { toggleDashboardTxInfoModal } from '../../actions/actionCreators'; import { toggleDashboardTxInfoModal } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
PaginationItemsPerPageSelectorRender, PaginationItemsPerPageSelectorRender,
PaginationRender, PaginationRender,

4
react/src/components/dashboard/walletsNativeTxHistory.render.js → react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.render.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
export const PaginationItemsPerPageSelectorRender = function() { export const PaginationItemsPerPageSelectorRender = function() {
return ( return (

4
react/src/components/dashboard/walletsNativeTxInfo.js → react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { toggleDashboardTxInfoModal } from '../../actions/actionCreators'; import { toggleDashboardTxInfoModal } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
class WalletsNativeTxInfo extends React.Component { class WalletsNativeTxInfo extends React.Component {
constructor(props) { constructor(props) {

4
react/src/components/dashboard/walletsNativeTxInfo.render.js → react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.render.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
const WalletsNativeTxInfoRender = function(txInfo) { const WalletsNativeTxInfoRender = function(txInfo) {
return ( return (

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

@ -6,8 +6,8 @@ import {
toggleReceiveCoinForm, toggleReceiveCoinForm,
toggleSendReceiveCoinForms, toggleSendReceiveCoinForms,
toggleDashboardActiveSection toggleDashboardActiveSection
} from '../../actions/actionCreators'; } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { import {
WalletsNavNoWalletRender, WalletsNavNoWalletRender,
WalletsNavWithWalletRender WalletsNavWithWalletRender

6
react/src/components/dashboard/walletsNav.render.js → react/src/components/dashboard/walletsNav/walletsNav.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
export const WalletsNavNoWalletRender = function () { export const WalletsNavNoWalletRender = function () {
return ( return (
@ -8,8 +8,8 @@ export const WalletsNavNoWalletRender = function () {
<div className="alert alert-info alert-dismissible"> <div className="alert alert-info alert-dismissible">
<button type="button" className="close"></button> <button type="button" className="close"></button>
<span className="font-size-24 text-align-center"> <span className="font-size-24 text-align-center">
<i className="icon fa-paw"></i> { translate('INDEX.NO_WALLET_CAPS') } <i className="icon fa-paw"></i> { translate('INDEX.NO_WALLET_CAPS') }
</span> </span>
<br/> <br/>
{ translate('INDEX.PLEASE_SELECT_A_WALLET') }. { translate('INDEX.PLEASE_SELECT_A_WALLET') }.
</div> </div>

6
react/src/components/dashboard/walletsNotariesList.js → react/src/components/dashboard/walletsNotariesList/walletsNotariesList.js

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { displayNotariesModal } from '../../actions/actionCreators'; import { displayNotariesModal } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import { TreeNode } from 'rc-tree'; import { TreeNode } from 'rc-tree';
import { import {
NotariesListRender, NotariesListRender,

4
react/src/components/dashboard/walletsNotariesList.render.js → react/src/components/dashboard/walletsNotariesList/walletsNotariesList.render.js

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import Tree, { TreeNode } from 'rc-tree'; import Tree, { TreeNode } from 'rc-tree';
import { animation } from '../../util/rc-tree-animate'; import { animation } from '../../../util/rc-tree-animate';
export const NotariesListRender = function (node, index) { export const NotariesListRender = function (node, index) {
<TreeNode title={ `Node ${index}` } key={ `node-${index}` }> <TreeNode title={ `Node ${index}` } key={ `node-${index}` }>

2
react/src/components/dashboard/walletsProgress.js → react/src/components/dashboard/walletsProgress/walletsProgress.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import WalletsProgressRender from './walletsProgress.render'; import WalletsProgressRender from './walletsProgress.render';
class WalletsProgress extends React.Component { class WalletsProgress extends React.Component {

2
react/src/components/dashboard/walletsProgress.render.js → react/src/components/dashboard/walletsProgress/walletsProgress.render.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
const WalletsProgressRender = function () { const WalletsProgressRender = function () {
return ( return (

4
react/src/components/dashboard/walletsTxInfo.js → react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { toggleDashboardTxInfoModal } from '../../actions/actionCreators'; import { toggleDashboardTxInfoModal } from '../../../actions/actionCreators';
import Store from '../../store'; import Store from '../../../store';
import WalletsTxInfoRender from './walletsTxInfo.render'; import WalletsTxInfoRender from './walletsTxInfo.render';
class WalletsTxInfo extends React.Component { class WalletsTxInfo extends React.Component {

4
react/src/components/dashboard/walletsTxInfo.render.js → react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { translate } from '../../translate/translate'; import { translate } from '../../../translate/translate';
import { secondsToString } from '../../util/time'; import { secondsToString } from '../../../util/time';
const WalletsTxInfoRender = function(txInfo) { const WalletsTxInfoRender = function(txInfo) {
return ( return (

6
react/src/components/main/walletMain.js

@ -2,9 +2,9 @@ import React from 'react';
import Toaster from '../toaster/toaster'; import Toaster from '../toaster/toaster';
import AddCoin from '../addcoin/addcoin'; import AddCoin from '../addcoin/addcoin';
import Login from '../login/login'; import Login from '../login/login';
import Dashboard from '../dashboard/dashboard'; import Dashboard from '../dashboard/main/dashboard';
import SyncOnly from '../dashboard/syncOnly'; import SyncOnly from '../dashboard/syncOnly/syncOnly';
import Notifications from '../dashboard/notifications'; import Notifications from '../dashboard/notifications/notifications';
class WalletMain extends React.Component { class WalletMain extends React.Component {
render() { render() {

2
react/src/styles/index.scss

@ -31,6 +31,6 @@
@import '../assets/skins/orange.min.css'; @import '../assets/skins/orange.min.css';
@import '../../node_modules/rc-tree/assets/index.css'; @import '../../node_modules/rc-tree/assets/index.css';
@import '../components/addcoin/addcoin.scss'; @import '../components/addcoin/addcoin.scss';
@import '../components/dashboard/dashboard.scss'; @import '../components/dashboard/main/dashboard.scss';
@import '../components/login/login.scss'; @import '../components/login/login.scss';
@import '../components/overrides.scss'; @import '../components/overrides.scss';

4
react/src/translate/en.js

@ -426,7 +426,9 @@ export const _lang = {
'BIN': 'Bin', 'BIN': 'Bin',
'DIR': 'Dir', 'DIR': 'Dir',
'ADD_PEER_IP': 'Add Peer IP', 'ADD_PEER_IP': 'Add Peer IP',
'APP_SESSION': 'App Session' 'APP_SESSION': 'App Session',
'EXPORT_KEYS_NOTE': 'Note: it\'s important that you provide the same passphrase you used to login to the wallet!<br>' +
'In case passphrases will not match wallet is going to log you out of current session.'
}, },
'TX_INFO': { 'TX_INFO': {
'ADDRESS': 'address', 'ADDRESS': 'address',

Loading…
Cancel
Save