mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Disable network dropdown on conf tx screen
This commit is contained in:
parent
966e4cfd11
commit
6daa834323
@ -203,6 +203,16 @@ App.prototype.renderSidebar = function () {
|
||||
}
|
||||
|
||||
App.prototype.renderAppBar = function () {
|
||||
const {
|
||||
isUnlocked,
|
||||
network,
|
||||
provider,
|
||||
networkDropdownOpen,
|
||||
showNetworkDropdown,
|
||||
hideNetworkDropdown,
|
||||
currentView,
|
||||
} = this.props
|
||||
|
||||
if (window.METAMASK_UI_TYPE === 'notification') {
|
||||
return null
|
||||
}
|
||||
@ -243,22 +253,21 @@ App.prototype.renderAppBar = function () {
|
||||
}, [
|
||||
// Network Indicator
|
||||
h(NetworkIndicator, {
|
||||
network: this.props.network,
|
||||
provider: this.props.provider,
|
||||
network,
|
||||
provider,
|
||||
disabled: currentView.name === 'confTx',
|
||||
onClick: (event) => {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
if (this.props.networkDropdownOpen === false) {
|
||||
this.props.showNetworkDropdown()
|
||||
} else {
|
||||
this.props.hideNetworkDropdown()
|
||||
}
|
||||
return networkDropdownOpen === false
|
||||
? showNetworkDropdown()
|
||||
: hideNetworkDropdown()
|
||||
},
|
||||
}),
|
||||
|
||||
]),
|
||||
|
||||
h('div.account-menu__icon', { onClick: this.props.toggleAccountMenu }, [
|
||||
isUnlocked && h('div.account-menu__icon', { onClick: this.props.toggleAccountMenu }, [
|
||||
h(Identicon, {
|
||||
address: this.props.selectedAddress,
|
||||
diameter: 32,
|
||||
|
@ -64,13 +64,18 @@ Network.prototype.render = function () {
|
||||
return (
|
||||
h('div.network-component.pointer', {
|
||||
className: classnames('network-component pointer', {
|
||||
'network-component--disabled': this.props.disabled,
|
||||
'ethereum-network': providerName === 'mainnet',
|
||||
'ropsten-test-network': providerName === 'ropsten' || parseInt(networkNumber) === 3,
|
||||
'kovan-test-network': providerName === 'kovan',
|
||||
'rinkeby-test-network': providerName === 'rinkeby',
|
||||
}),
|
||||
title: hoverText,
|
||||
onClick: (event) => this.props.onClick(event),
|
||||
onClick: (event) => {
|
||||
if (!this.props.disabled) {
|
||||
this.props.onClick(event)
|
||||
}
|
||||
},
|
||||
}, [
|
||||
(function () {
|
||||
switch (iconName) {
|
||||
|
@ -1,3 +1,12 @@
|
||||
.network-component--disabled {
|
||||
border-color: transparent !important;
|
||||
cursor: default;
|
||||
|
||||
.fa-caret-down {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.network-component.pointer {
|
||||
border: 1px solid $shark;
|
||||
border-radius: 82px;
|
||||
|
Loading…
Reference in New Issue
Block a user