aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/dropdowns
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-07 08:15:45 +0800
committerDan <danjm.com@gmail.com>2018-03-07 08:15:45 +0800
commit9d215bab0fe124f036d2ac41f375331c8d43b72b (patch)
tree6bbbdb2e6a2dcd5948ee8473cad152232c73643b /ui/app/components/dropdowns
parentf06bca1151b07d908cd90f6efd97064e288e5f27 (diff)
parent9762a730413129361062804aa8dfc7be7cf74868 (diff)
downloadtangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.gz
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.bz2
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.lz
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.xz
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.zst
tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.zip
Merge branch 'master' into i18n
Diffstat (limited to 'ui/app/components/dropdowns')
-rw-r--r--ui/app/components/dropdowns/components/account-dropdowns.js4
-rw-r--r--ui/app/components/dropdowns/components/dropdown.js2
-rw-r--r--ui/app/components/dropdowns/network-dropdown.js40
-rw-r--r--ui/app/components/dropdowns/simple-dropdown.js2
4 files changed, 31 insertions, 17 deletions
diff --git a/ui/app/components/dropdowns/components/account-dropdowns.js b/ui/app/components/dropdowns/components/account-dropdowns.js
index 620ac8483..af29a4792 100644
--- a/ui/app/components/dropdowns/components/account-dropdowns.js
+++ b/ui/app/components/dropdowns/components/account-dropdowns.js
@@ -1,5 +1,5 @@
const Component = require('react').Component
-const PropTypes = require('react').PropTypes
+const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const actions = require('../../../actions')
const genAccountLink = require('../../../../lib/account-link.js')
@@ -282,7 +282,7 @@ class AccountDropdowns extends Component {
dropdownWrapperStyle,
),
isOpen: optionsMenuActive,
- onClickOutside: () => {
+ onClickOutside: (event) => {
const { classList } = event.target
const isNotToggleElement = !classList.contains(this.optionsMenuToggleClassName)
if (optionsMenuActive && isNotToggleElement) {
diff --git a/ui/app/components/dropdowns/components/dropdown.js b/ui/app/components/dropdowns/components/dropdown.js
index 15d064be8..0336dbb8b 100644
--- a/ui/app/components/dropdowns/components/dropdown.js
+++ b/ui/app/components/dropdowns/components/dropdown.js
@@ -1,5 +1,5 @@
const Component = require('react').Component
-const PropTypes = require('react').PropTypes
+const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const MenuDroppo = require('../../menu-droppo')
const extend = require('xtend')
diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js
index 0e16048d5..67daaa5fd 100644
--- a/ui/app/components/dropdowns/network-dropdown.js
+++ b/ui/app/components/dropdowns/network-dropdown.js
@@ -85,7 +85,7 @@ NetworkDropdown.prototype.render = function () {
style: {
position: 'absolute',
top: '58px',
- minWidth: '309px',
+ width: '309px',
zIndex: '55px',
},
innerStyle: {
@@ -277,11 +277,21 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) {
key: `common${rpc}`,
closeMenu: () => this.props.hideNetworkDropdown(),
onClick: () => props.setRpcTarget(rpc),
+ style: {
+ fontFamily: 'DIN OT',
+ fontSize: '16px',
+ lineHeight: '20px',
+ padding: '12px 0',
+ },
},
[
- h('i.fa.fa-question-circle.fa-lg.menu-icon'),
- rpc,
- rpcTarget === rpc ? h('.check', '✓') : null,
+ rpcTarget === rpc ? h('i.fa.fa-check') : h('.network-check__transparent', '✓'),
+ h('i.fa.fa-question-circle.fa-med.menu-icon-circle'),
+ h('span.network-name-item', {
+ style: {
+ color: rpcTarget === rpc ? '#ffffff' : '#9b9b9b',
+ },
+ }, rpc),
]
)
}
@@ -294,12 +304,6 @@ NetworkDropdown.prototype.renderCustomOption = function (provider) {
if (type !== 'rpc') return null
- // Concatenate long URLs
- let label = rpcTarget
- if (rpcTarget.length > 31) {
- label = label.substr(0, 34) + '...'
- }
-
switch (rpcTarget) {
case 'http://localhost:8545':
@@ -312,11 +316,21 @@ NetworkDropdown.prototype.renderCustomOption = function (provider) {
key: rpcTarget,
onClick: () => props.setRpcTarget(rpcTarget),
closeMenu: () => this.props.hideNetworkDropdown(),
+ style: {
+ fontFamily: 'DIN OT',
+ fontSize: '16px',
+ lineHeight: '20px',
+ padding: '12px 0',
+ },
},
[
- h('i.fa.fa-question-circle.fa-lg.menu-icon'),
- label,
- h('.check', '✓'),
+ h('i.fa.fa-check'),
+ h('i.fa.fa-question-circle.fa-med.menu-icon-circle'),
+ h('span.network-name-item', {
+ style: {
+ color: '#ffffff',
+ },
+ }, rpcTarget),
]
)
}
diff --git a/ui/app/components/dropdowns/simple-dropdown.js b/ui/app/components/dropdowns/simple-dropdown.js
index 7bb48e57b..bba088ed1 100644
--- a/ui/app/components/dropdowns/simple-dropdown.js
+++ b/ui/app/components/dropdowns/simple-dropdown.js
@@ -1,5 +1,5 @@
const { Component } = require('react')
-const PropTypes = require('react').PropTypes
+const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const classnames = require('classnames')
const R = require('ramda')