From 37796bdaa97650d9d00610a432c7ca457dc5b191 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 4 Jan 2018 17:05:10 +0100 Subject: [PATCH] Pull in dapp-status (#7457) * Remove status from tabs * Update js-shared, add dapp-status --- .../src/views/Application/TabBar/Tab/tab.js | 26 +----- js-old/src/views/Application/TabBar/tabBar.js | 29 +------ js/package-lock.json | 86 ++++++++++++++++++- js/package.json | 3 +- 4 files changed, 88 insertions(+), 56 deletions(-) diff --git a/js-old/src/views/Application/TabBar/Tab/tab.js b/js-old/src/views/Application/TabBar/Tab/tab.js index 9496c73e4..78bd6a241 100644 --- a/js-old/src/views/Application/TabBar/Tab/tab.js +++ b/js-old/src/views/Application/TabBar/Tab/tab.js @@ -18,15 +18,10 @@ import { Tab as MUITab } from 'material-ui/Tabs'; import React, { Component, PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; -import { Badge } from '~/ui'; - import styles from '../tabBar.css'; -const SIGNER_ID = 'signer'; - export default class Tab extends Component { static propTypes = { - pendings: PropTypes.number, view: PropTypes.object.isRequired }; @@ -37,9 +32,7 @@ export default class Tab extends Component { ); @@ -55,21 +48,4 @@ export default class Tab extends Component { ); } - - renderSignerLabel () { - const { pendings } = this.props; - let bubble; - - if (pendings) { - bubble = ( - - ); - } - - return this.renderLabel(SIGNER_ID, bubble); - } } diff --git a/js-old/src/views/Application/TabBar/tabBar.js b/js-old/src/views/Application/TabBar/tabBar.js index 068562db1..cf0ce1afb 100644 --- a/js-old/src/views/Application/TabBar/tabBar.js +++ b/js-old/src/views/Application/TabBar/tabBar.js @@ -20,8 +20,6 @@ import { Link } from 'react-router'; import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'; import { isEqual } from 'lodash'; -import { StatusIndicator } from '~/ui'; - import Tab from './Tab'; import styles from './tabBar.css'; @@ -31,8 +29,6 @@ class TabBar extends Component { }; static propTypes = { - pending: PropTypes.array, - health: PropTypes.object.isRequired, views: PropTypes.array.isRequired }; @@ -41,29 +37,12 @@ class TabBar extends Component { }; render () { - const { health } = this.props; - return (
- -
- -
- { this.renderTabItems() }
@@ -74,7 +53,7 @@ class TabBar extends Component { } renderTabItems () { - const { views, pending } = this.props; + const { views } = this.props; return views.map((view, index) => { return ( @@ -85,7 +64,6 @@ class TabBar extends Component { to={ view.route } > @@ -109,7 +87,6 @@ function mapStateToProps (initState) { return (state) => { const { availability = 'unknown' } = state.nodeStatus.nodeKind || {}; const { views } = state.settings; - const { health } = state.nodeStatus; const viewIds = Object .keys(views) @@ -123,7 +100,7 @@ function mapStateToProps (initState) { }); if (isEqual(viewIds, filteredViewIds)) { - return { views: filteredViews, health }; + return { views: filteredViews }; } filteredViewIds = viewIds; @@ -132,7 +109,7 @@ function mapStateToProps (initState) { id })); - return { views: filteredViews, health }; + return { views: filteredViews }; }; } diff --git a/js/package-lock.json b/js/package-lock.json index 9eadf4052..9ddf045ac 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -197,6 +197,78 @@ "version": "github:paritytech/dapp-signaturereg#a288f69f1912970f3d1bbbe0281f87a4dc9a6743", "dev": true }, + "@parity/dapp-status": { + "version": "github:js-dist-paritytech/dapp-status#90c6425804800b1d3599f602cd257e8e4cfa6428", + "dev": true, + "requires": { + "@parity/api": "2.1.14", + "@parity/mobx": "1.0.5", + "@parity/ui": "3.0.22", + "format-number": "3.0.0", + "mobx": "3.4.1", + "mobx-react": "4.3.5", + "prop-types": "15.6.0", + "react": "16.2.0", + "react-dom": "16.2.0", + "react-intl": "2.4.0", + "react-scripts": "1.0.17", + "rlp": "2.0.0", + "semantic-ui-css": "2.2.12", + "semantic-ui-react": "0.77.0" + }, + "dependencies": { + "@parity/mobx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@parity/mobx/-/mobx-1.0.5.tgz", + "integrity": "sha512-tKVGP81jOPsZVBqKwULDYTXe9jaJMNVUXGYh8qsAeOj1aUE/sWxKeM+lhKUnWOhPi21qObKPzkoJ17qO+1CyWQ==", + "dev": true, + "requires": { + "@parity/ledger": "2.1.2" + } + }, + "mobx": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-3.4.1.tgz", + "integrity": "sha1-N6vl7ogtQBgo2fJsbBovR2FLu+8=", + "dev": true + }, + "prop-types": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", + "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "react": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", + "integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.6.0" + } + }, + "react-dom": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", + "integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.6.0" + } + } + } + }, "@parity/dapp-tokendeploy": { "version": "github:paritytech/dapp-tokendeploy#3c2b03e2a8703ac29e11f36df39ee5f8028dce28", "dev": true @@ -256,9 +328,9 @@ "version": "github:paritytech/plugin-signer-qr#c16423de5b8a8f68ebd5f1e78e084fa959329a9f" }, "@parity/shared": { - "version": "2.2.18", - "resolved": "https://registry.npmjs.org/@parity/shared/-/shared-2.2.18.tgz", - "integrity": "sha512-+PEdqdEBIDY4HtvQcYNAXoseCPVesXS+RBU1dNC2myPZkivTMfd8bFfepZT6yANJTPs6NDI9DSzwrLh9YkH1+g==", + "version": "2.2.20", + "resolved": "https://registry.npmjs.org/@parity/shared/-/shared-2.2.20.tgz", + "integrity": "sha512-qOD+3TtZ9cbRSugl12VKmsjJKUfejG208Lugzfrs1irrkB3S7jHhYAYa+tkMrHafQX9MbsfpmkDT6jToh5iOIg==", "requires": { "@parity/ledger": "2.1.2", "eventemitter3": "2.0.3", @@ -321,7 +393,7 @@ "@parity/api": "2.1.14", "@parity/etherscan": "2.1.3", "@parity/mobx": "1.0.4", - "@parity/shared": "2.2.18", + "@parity/shared": "2.2.20", "babel-runtime": "6.26.0", "bignumber.js": "4.1.0", "brace": "0.11.0", @@ -6061,6 +6133,12 @@ "mime-types": "2.1.17" } }, + "format-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/format-number/-/format-number-3.0.0.tgz", + "integrity": "sha512-RWcbtINcRZ2DWCo4EcJgOJUYIwtsY5LKlTtL5OX1vfGsxEEK5mKaGxZC0p4Mgy63vXR12rut3lnjwCQ8YIlRMw==", + "dev": true + }, "formatio": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", diff --git a/js/package.json b/js/package.json index c88bbcf18..6cc8c0e7d 100644 --- a/js/package.json +++ b/js/package.json @@ -53,6 +53,7 @@ "@parity/dapp-localtx": "paritytech/dapp-localtx", "@parity/dapp-registry": "paritytech/dapp-registry", "@parity/dapp-signaturereg": "paritytech/dapp-signaturereg", + "@parity/dapp-status": "js-dist-paritytech/dapp-status", "@parity/dapp-tokendeploy": "paritytech/dapp-tokendeploy", "@parity/dapp-tokenreg": "paritytech/dapp-tokenreg", "babel-cli": "6.26.0", @@ -145,7 +146,7 @@ "@parity/plugin-signer-default": "paritytech/plugin-signer-default", "@parity/plugin-signer-hardware": "paritytech/plugin-signer-hardware", "@parity/plugin-signer-qr": "paritytech/plugin-signer-qr", - "@parity/shared": "2.2.18", + "@parity/shared": "2.2.20", "@parity/ui": "3.0.22", "keythereum": "1.0.2", "lodash.flatten": "4.4.0",