aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-28 02:25:10 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-28 02:25:10 +0800
commitca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c (patch)
treec70a6806719711fad063e32b9f18c61f637e2e6a /ui/app/app.js
parent62854398f1d3c72a82ae9d4feb03d9a1a947534e (diff)
downloadtangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar.gz
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar.bz2
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar.lz
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar.xz
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.tar.zst
tangerine-wallet-browser-ca5cf06ae9e3e417dd3488bb0d94cdeec74ca18c.zip
Concatenate custom RPC labels that are too long
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index cf865f23f..a05a42516 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -499,6 +499,12 @@ App.prototype.renderCustomOption = function (provider) {
const { rpcTarget, type } = 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':
@@ -506,7 +512,8 @@ App.prototype.renderCustomOption = function (provider) {
default:
return h(DropMenuItem, {
- label: `${rpcTarget}`,
+ label,
+ key: rpcTarget,
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
icon: h('i.fa.fa-question-circle.fa-lg'),
activeNetworkRender: 'custom',
@@ -524,6 +531,7 @@ App.prototype.renderCommonRpc = function (rpcList, provider) {
} else {
return h(DropMenuItem, {
label: rpc,
+ key: rpc,
closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
action: () => props.dispatch(actions.setRpcTarget(rpc)),
icon: h('i.fa.fa-question-circle.fa-lg'),