From 78ccbca1177f56e00b7a5625a28e1a1b0583736b Mon Sep 17 00:00:00 2001 From: Petr Balashov Date: Mon, 15 May 2017 13:43:32 +0200 Subject: [PATCH] cleanup --- .../dashboard/walletsNativeSyncProgress.js | 60 +++++--- .../dashboard/walletsNativeTxHistory.js | 136 +++++++++++------- .../dashboard/walletsNativeTxInfo.js | 99 +++++++++---- react/src/components/dashboard/walletsNav.js | 43 ++++-- .../dashboard/walletsNotariesList.js | 29 ++-- .../components/dashboard/walletsProgress.js | 51 +++++-- .../src/components/dashboard/walletsTxInfo.js | 62 +++++--- react/src/translate/en.js | 8 ++ 8 files changed, 334 insertions(+), 154 deletions(-) diff --git a/react/src/components/dashboard/walletsNativeSyncProgress.js b/react/src/components/dashboard/walletsNativeSyncProgress.js index 7ab91ff..abce78d 100644 --- a/react/src/components/dashboard/walletsNativeSyncProgress.js +++ b/react/src/components/dashboard/walletsNativeSyncProgress.js @@ -3,31 +3,52 @@ import { translate } from '../../translate/translate'; class WalletsNativeSyncProgress extends React.Component { renderSyncPercentagePlaceholder() { - if (this.props.Dashboard.progress.blocks > 0 && this.props.Dashboard.progress.longestchain === 0) { + if (this.props.Dashboard.progress.blocks > 0 && + this.props.Dashboard.progress.longestchain === 0) { return ( -
- {translate('INDEX.SYNC_ERR_LONGESTCHAIN')} +
+ { translate('INDEX.SYNC_ERR_LONGESTCHAIN') }
); } else if (this.props.Dashboard.progress.blocks === 0) { return ( -
- {translate('INDEX.SYNC_ERR_BLOCKS')} +
+ { translate('INDEX.SYNC_ERR_BLOCKS') }
); } else { var syncPercentage = (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2) + '%').replace('NaN', 0); return ( -
- {syncPercentage} | {this.props.Dashboard.progress.blocks} / {this.props.Dashboard.progress.longestchain} | {translate('INDEX.CONNECTIONS')}: {this.props.Dashboard.progress.connections} +
+ { syncPercentage } | { this.props.Dashboard.progress.blocks } / { this.props.Dashboard.progress.longestchain } | { translate('INDEX.CONNECTIONS') }: { this.props.Dashboard.progress.connections }
); } } renderActivatingBestChainProgress() { - if (this.props.Settings && this.props.Settings.debugLog && this.props.Dashboard.progress.remoteKMDNode) { + if (this.props.Settings && + this.props.Settings.debugLog && + this.props.Dashboard.progress.remoteKMDNode) { if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1) { let temp = this.props.Settings.debugLog.split(' '); let currentBestChain; @@ -46,16 +67,21 @@ class WalletsNativeSyncProgress extends React.Component { } renderChainActivationNotification() { - if ((this.props.Dashboard.progress.blocks < this.props.Dashboard.progress.longestchain) || this.props.Dashboard.progress.remoteKMDNode) { + if ((this.props.Dashboard.progress.blocks < this.props.Dashboard.progress.longestchain) || + this.props.Dashboard.progress.remoteKMDNode) { return ( -