diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-01-06 07:37:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-06 07:37:16 +0800 |
commit | 98ebdeeeacc973a98fd07ead204cf4d84eb3adee (patch) | |
tree | e1cdd6bf33af4da4d3a21de0018d51b33976c43c | |
parent | 906c3882bb426985b403e744727f3a2071eabce7 (diff) | |
parent | 4e62ae98bd7c62ef0618c4c5e88569b86d1bffec (diff) | |
download | tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar.gz tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar.bz2 tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar.lz tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar.xz tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.tar.zst tangerine-wallet-browser-98ebdeeeacc973a98fd07ead204cf4d84eb3adee.zip |
Merge pull request #970 from MetaMask/network-indicator-refactor
Network indicator modifications
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | ui/app/app.js | 22 | ||||
-rw-r--r-- | ui/app/components/network.js | 6 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 7 | ||||
-rw-r--r-- | ui/app/css/index.css | 3 |
5 files changed, 24 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8383e104d..420296bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Remove certain non-essential permissions from certain builds. - Add a check for when a tx is included in a block. +- Minor modifications to network display. +- Network now displays properly for pending transactions. - Implement replay attack protections allowed by EIP 155. - Fix bug where sometimes loading account data would fail by querying a future block. diff --git a/ui/app/app.js b/ui/app/app.js index 6da0c3b1d..9efe95874 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -141,15 +141,21 @@ App.prototype.renderAppBar = function () { src: '/images/icon-128.png', }), - h(NetworkIndicator, { - network: this.props.network, - provider: this.props.provider, - onClick: (event) => { - event.preventDefault() - event.stopPropagation() - this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) + h('#network-spacer.flex-center', { + style: { + marginRight: '-72px', }, - }), + }, [ + h(NetworkIndicator, { + network: this.props.network, + provider: this.props.provider, + onClick: (event) => { + event.preventDefault() + event.stopPropagation() + this.setState({ isNetworkMenuOpen: !isNetworkMenuOpen }) + }, + }), + ]), ]), // metamask name diff --git a/ui/app/components/network.js b/ui/app/components/network.js index 43dc747b3..77805fd57 100644 --- a/ui/app/components/network.js +++ b/ui/app/components/network.js @@ -46,11 +46,7 @@ Network.prototype.render = function () { } return ( - h('#network_component.flex-center.pointer', { - style: { - marginRight: '-27px', - marginLeft: '-3px', - }, + h('#network_component.pointer', { title: hoverText, onClick: (event) => this.props.onClick(event), }, [ diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 0b1dcac45..52b7a7ae4 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -4,6 +4,7 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group') const h = require('react-hyperscript') const connect = require('react-redux').connect const actions = require('./actions') +const NetworkIndicator = require('./components/network') const txHelper = require('../lib/tx-helper') const isPopupOrNotification = require('../../app/scripts/lib/is-popup-or-notification') const ethUtil = require('ethereumjs-util') @@ -24,6 +25,7 @@ function mapStateToProps (state) { index: state.appState.currentView.context, warning: state.appState.warning, network: state.metamask.network, + provider: state.metamask.provider, } } @@ -36,6 +38,7 @@ ConfirmTxScreen.prototype.render = function () { var state = this.props var network = state.network + var provider = state.provider var unconfTxs = state.unconfTxs var unconfMsgs = state.unconfMsgs var unconfTxList = txHelper(unconfTxs, unconfMsgs, network) @@ -54,6 +57,10 @@ ConfirmTxScreen.prototype.render = function () { onClick: this.goHome.bind(this), }) : null, h('h2.page-subtitle', 'Confirm Transaction'), + isNotification ? h(NetworkIndicator, { + network: network, + provider: provider, + }) : null, ]), h('h3', { diff --git a/ui/app/css/index.css b/ui/app/css/index.css index 975a5289b..16e1dbe7e 100644 --- a/ui/app/css/index.css +++ b/ui/app/css/index.css @@ -165,9 +165,6 @@ textarea.twelve-word-phrase { } .network-name { - position: absolute; - top: 8px; - left: 60px; width: 5.2em; line-height: 9px; text-rendering: geometricPrecision; |