mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Wrap smaller custom block explorer url text (#6714)
This commit is contained in:
parent
9a1a207ffa
commit
6fb0d4af27
@ -1742,6 +1742,9 @@
|
|||||||
"viewAccount": {
|
"viewAccount": {
|
||||||
"message": "View Account"
|
"message": "View Account"
|
||||||
},
|
},
|
||||||
|
"viewinExplorer": {
|
||||||
|
"message": "View in Explorer"
|
||||||
|
},
|
||||||
"viewOnCustomBlockExplorer": {
|
"viewOnCustomBlockExplorer": {
|
||||||
"message": "View at $1"
|
"message": "View at $1"
|
||||||
},
|
},
|
||||||
|
@ -119,8 +119,11 @@ AccountDetailsDropdown.prototype.render = function () {
|
|||||||
this.props.onClose()
|
this.props.onClose()
|
||||||
},
|
},
|
||||||
text: (rpcPrefs.blockExplorerUrl
|
text: (rpcPrefs.blockExplorerUrl
|
||||||
? this.context.t('blockExplorerView', [rpcPrefs.blockExplorerUrl.match(/^https?:\/\/(.+)/)[1]])
|
? this.context.t('viewinExplorer')
|
||||||
: this.context.t('viewOnEtherscan')),
|
: this.context.t('viewOnEtherscan')),
|
||||||
|
subText: (rpcPrefs.blockExplorerUrl
|
||||||
|
? rpcPrefs.blockExplorerUrl.match(/^https?:\/\/(.+)/)[1]
|
||||||
|
: null),
|
||||||
icon: h(`img`, { src: 'images/open-etherscan.svg', style: { height: '15px' } }),
|
icon: h(`img`, { src: 'images/open-etherscan.svg', style: { height: '15px' } }),
|
||||||
}),
|
}),
|
||||||
isRemovable ? h(Item, {
|
isRemovable ? h(Item, {
|
||||||
|
@ -20,16 +20,18 @@ Item.prototype.render = function () {
|
|||||||
icon,
|
icon,
|
||||||
children,
|
children,
|
||||||
text,
|
text,
|
||||||
|
subText,
|
||||||
className = '',
|
className = '',
|
||||||
onClick,
|
onClick,
|
||||||
} = this.props
|
} = this.props
|
||||||
const itemClassName = `menu__item ${className} ${onClick ? 'menu__item--clickable' : ''}`
|
const itemClassName = `menu__item ${className} ${onClick ? 'menu__item--clickable' : ''}`
|
||||||
const iconComponent = icon ? h('div.menu__item__icon', [icon]) : null
|
const iconComponent = icon ? h('div.menu__item__icon', [icon]) : null
|
||||||
const textComponent = text ? h('div.menu__item__text', text) : null
|
const textComponent = text ? h('div.menu__item__text', text) : null
|
||||||
|
const subTextComponent = subText ? h('div.menu__item__subtext', subText) : null
|
||||||
|
|
||||||
return children
|
return children
|
||||||
? h('div', { className: itemClassName, onClick }, children)
|
? h('div', { className: itemClassName, onClick }, children)
|
||||||
: h('div.menu__item', { className: itemClassName, onClick }, [ iconComponent, textComponent ]
|
: h('div.menu__item', { className: itemClassName, onClick }, [ iconComponent, textComponent, subTextComponent ]
|
||||||
.filter(d => Boolean(d))
|
.filter(d => Boolean(d))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
&__item {
|
&__item {
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 201;
|
z-index: 201;
|
||||||
@ -39,6 +39,11 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__subtext {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 5px 0px 0px 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__divider {
|
&__divider {
|
||||||
|
Loading…
Reference in New Issue
Block a user