1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Updates to network dropdown test network messaging (#12722)

* Updates to network dropdown test network messaging

* Updating text from Disable/enable -> Show/hide
This commit is contained in:
ryanml 2021-11-16 13:32:40 -07:00 committed by Dan Miller
parent 730fec4a30
commit 49684eebdc
3 changed files with 18 additions and 22 deletions

View File

@ -593,10 +593,6 @@
"decryptRequest": { "decryptRequest": {
"message": "Decrypt request" "message": "Decrypt request"
}, },
"defaultNetwork": {
"message": "The default network for Ether transactions is Mainnet. You can also $1 test networks $2.",
"description": "$1 is the 'enable' or 'disable' key, depending on whether the display of test networks is enabled or not. $2 is a clickable link with text defined by the 'here' key. The link will open to the advanced settings where users can enable the display of test networks in the network dropdown."
},
"delete": { "delete": {
"message": "Delete" "message": "Delete"
}, },
@ -621,9 +617,6 @@
"directDepositEtherExplainer": { "directDepositEtherExplainer": {
"message": "If you already have some Ether, the quickest way to get Ether in your new wallet by direct deposit." "message": "If you already have some Ether, the quickest way to get Ether in your new wallet by direct deposit."
}, },
"disable": {
"message": "disable"
},
"disconnect": { "disconnect": {
"message": "Disconnect" "message": "Disconnect"
}, },
@ -775,9 +768,6 @@
"editPermission": { "editPermission": {
"message": "Edit Permission" "message": "Edit Permission"
}, },
"enable": {
"message": "enable"
},
"enableFromSettings": { "enableFromSettings": {
"message": " Enable it from Settings." "message": " Enable it from Settings."
}, },
@ -2201,6 +2191,9 @@
"showHexDataDescription": { "showHexDataDescription": {
"message": "Select this to show the hex data field on the send screen" "message": "Select this to show the hex data field on the send screen"
}, },
"showHide": {
"message": "Show/hide"
},
"showIncomingTransactions": { "showIncomingTransactions": {
"message": "Show Incoming Transactions" "message": "Show Incoming Transactions"
}, },
@ -2759,6 +2752,10 @@
"message": "To: $1", "message": "To: $1",
"description": "$1 is the address to include in the To label. It is typically shortened first using shortenAddress" "description": "$1 is the address to include in the To label. It is typically shortened first using shortenAddress"
}, },
"toggleTestNetworks": {
"message": "$1 test networks",
"description": "$1 is a clickable link with text defined by the 'showHide' key. The link will open to the advanced settings where users can enable the display of test networks in the network dropdown."
},
"token": { "token": {
"message": "Token" "message": "Token"
}, },

View File

@ -313,10 +313,7 @@ class NetworkDropdown extends Component {
<div className="network-dropdown-divider" /> <div className="network-dropdown-divider" />
{showTestnetMessageInDropdown ? ( {showTestnetMessageInDropdown ? (
<div className="network-dropdown-content"> <div className="network-dropdown-content">
{t('defaultNetwork', [ {t('toggleTestNetworks', [
<span key="testNetworksEnabled">
{shouldShowTestNetworks ? t('disable') : t('enable')}
</span>,
<a <a
href="#" href="#"
key="advancedSettingsLink" key="advancedSettingsLink"
@ -327,14 +324,15 @@ class NetworkDropdown extends Component {
history.push(`${ADVANCED_ROUTE}#show-testnets`); history.push(`${ADVANCED_ROUTE}#show-testnets`);
}} }}
> >
{t('here')} {t('showHide')}
</a>, </a>,
])} ])}
<button <button
title={t('dismiss')}
onClick={hideTestNetMessage} onClick={hideTestNetMessage}
className="fas fa-times network-dropdown-content--close" className="network-dropdown-content--dismiss"
/> >
{t('dismiss')}
</button>
</div> </div>
) : null} ) : null}
</div> </div>

View File

@ -166,7 +166,6 @@
&--link { &--link {
color: $white; color: $white;
cursor: pointer; cursor: pointer;
font-weight: bold;
text-decoration: underline; text-decoration: underline;
&:hover { &:hover {
@ -174,12 +173,14 @@
} }
} }
&--close { &--dismiss {
color: $white; color: inherit;
background: inherit; background: inherit;
position: absolute; position: absolute;
top: 64px; top: 63px;
right: 10px; right: 10px;
border: 1px solid $dusty-gray;
border-radius: 10px;
} }
} }