1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add lock icon to default networks (#9269)

Co-authored-by: Patryk Łucka <patryk.lucka@consensys.net>
This commit is contained in:
Patryk Łucka 2020-08-19 17:01:58 +02:00 committed by GitHub
parent c0d78401fc
commit 50c4845d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -185,6 +185,11 @@
&:hover {
cursor: pointer;
}
svg {
margin-left: 10px;
padding-top: 3px;
}
}
&__networks-list-arrow {
@ -214,6 +219,11 @@
font-weight: bold;
color: #000;
}
&__networks-list-name--disabled {
font-weight: 300;
color: #cdcdcd;
}
}
.network-form {

View File

@ -5,6 +5,7 @@ import { SETTINGS_ROUTE } from '../../../helpers/constants/routes'
import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums'
import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
import Button from '../../../components/ui/button'
import LockIcon from '../../../components/ui/lock-icon'
import NetworkDropdownIcon from '../../../components/app/dropdowns/components/network-dropdown-icon'
import NetworkForm from './network-form'
@ -117,9 +118,17 @@ export default class NetworksTab extends PureComponent {
<div
className={classnames('networks-tab__networks-list-name', {
'networks-tab__networks-list-name--selected': displayNetworkListItemAsSelected,
'networks-tab__networks-list-name--disabled': currentProviderType !== 'rpc' && !displayNetworkListItemAsSelected,
})}
>
{ label || this.context.t(labelKey) }
{ currentProviderType !== 'rpc' && (
<LockIcon
width="14px"
height="17px"
fill="#cdcdcd"
/>
) }
</div>
<div className="networks-tab__networks-list-arrow" />
</div>