From 5d2279e79261414d8ebc551d7602a5a5447046f8 Mon Sep 17 00:00:00 2001 From: Zhiting Lin Date: Fri, 7 Dec 2018 15:33:07 +0800 Subject: [PATCH] add the peer information page. --- src/actions.js | 2 ++ src/features/app/components/Sync/Sync.jsx | 13 +++++++-- src/features/peers/actions.js | 33 ++++++++++++++++++++++ src/features/peers/components/List.jsx | 32 +++++++++++++++++++++ src/features/peers/components/List.scss | 12 ++++++++ src/features/peers/components/ListItem.jsx | 25 ++++++++++++++++ src/features/peers/components/index.js | 5 ++++ src/features/peers/index.js | 9 ++++++ src/features/peers/reducers.js | 16 +++++++++++ src/features/peers/routes.js | 16 +++++++++++ .../shared/components/TableList/TableList.jsx | 2 +- src/locales/en/translation.json | 7 ++++- src/locales/zh/translation.json | 7 ++++- src/reducers.js | 2 ++ src/routes.js | 2 ++ src/sdk/api/peer.js | 15 ++++++++++ src/sdk/client.js | 3 ++ 17 files changed, 196 insertions(+), 5 deletions(-) create mode 100644 src/features/peers/actions.js create mode 100644 src/features/peers/components/List.jsx create mode 100644 src/features/peers/components/List.scss create mode 100644 src/features/peers/components/ListItem.jsx create mode 100644 src/features/peers/components/index.js create mode 100644 src/features/peers/index.js create mode 100644 src/features/peers/reducers.js create mode 100644 src/features/peers/routes.js create mode 100644 src/sdk/api/peer.js diff --git a/src/actions.js b/src/actions.js index f137741..2abeca7 100644 --- a/src/actions.js +++ b/src/actions.js @@ -13,6 +13,7 @@ import { actions as transaction } from 'features/transactions' import { actions as transactionFeed } from 'features/transactionFeeds' import { actions as tutorial } from 'features/tutorial' import { actions as unspent } from 'features/unspents' +import { actions as peer } from 'features/peers' const actions = { accessControl, @@ -30,6 +31,7 @@ const actions = { transactionFeed, tutorial, unspent, + peer } export default actions diff --git a/src/features/app/components/Sync/Sync.jsx b/src/features/app/components/Sync/Sync.jsx index 4262e52..7d28f16 100644 --- a/src/features/app/components/Sync/Sync.jsx +++ b/src/features/app/components/Sync/Sync.jsx @@ -1,6 +1,7 @@ import React from 'react' import { connect } from 'react-redux' import { ProgressBar, OverlayTrigger, Tooltip } from 'react-bootstrap' +import { Link } from 'react-router' import navStyles from '../Navigation/Navigation.scss' import styles from './Sync.scss' import {withNamespaces} from 'react-i18next' @@ -29,7 +30,11 @@ class Sync extends React.Component { if (syncing) { return