From d200bcc24c4d308da4dd6627ee6b0afb762cd1e9 Mon Sep 17 00:00:00 2001 From: salimtb Date: Thu, 13 Jun 2024 18:43:52 +0200 Subject: [PATCH] feat: add tooltip --- app/_locales/en/messages.json | 8 ++++ .../network-list-menu/network-list-menu.js | 9 ++++ .../popular-network-list.tsx | 48 ++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 981aaa22ba34..7b0de6ce5a96 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1614,6 +1614,9 @@ "enabled": { "message": "Enabled" }, + "enabledNetworks": { + "message": "Enabled networks" + }, "encryptionPublicKeyNotice": { "message": "$1 would like your public encryption key. By consenting, this site will be able to compose encrypted messages to you.", "description": "$1 is the web3 site name" @@ -3819,6 +3822,11 @@ "popularCustomNetworks": { "message": "Popular custom networks" }, + "popularNetworkAddToolTip": { + "message": "Some of these networks rely on third parties. The connections may be less reliable or enable third-parties to track activity. $1", + "description": "$1 is Learn more link" + }, + "portfolio": { "message": "Portfolio" }, diff --git a/ui/components/multichain/network-list-menu/network-list-menu.js b/ui/components/multichain/network-list-menu/network-list-menu.js index 9f6176f66610..fa9c6ea8fcf4 100644 --- a/ui/components/multichain/network-list-menu/network-list-menu.js +++ b/ui/components/multichain/network-list-menu/network-list-menu.js @@ -353,6 +353,15 @@ export const NetworkListMenu = ({ onClose }) => { /> ) : null} + + {t('enabledNetworks')} + {searchResults.length === 0 && isSearching ? ( - {t('additionalNetworks')} + + {t('additionalNetworks')} + + {t('popularNetworkAddToolTip', [ + + { + global.platform.openTab({ + url: ZENDESK_URLS.UNKNOWN_NETWORK, + }); + }} + > + {t('learnMoreUpperCase')} + + , + , + ])} + + } + trigger="mouseenter" + > + + + + + )}