Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): add tooltip to wallet qrcode button
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Oct 4, 2020
1 parent ee687ca commit 1b22b19
Show file tree
Hide file tree
Showing 36 changed files with 113 additions and 35 deletions.
11 changes: 10 additions & 1 deletion renderer/components/Wallet/WalletBalance.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Box, Flex } from 'rebass/styled-components'
import { useIntl } from 'react-intl'
import { CryptoSelector, CryptoValue, FiatValue } from 'containers/UI'
import { Button, Text } from 'components/UI'
import Qrcode from 'components/Icon/Qrcode'
import messages from './messages'

const WalletBalance = ({ totalBalance, openWalletModal }) => {
const { formatMessage } = useIntl()
const approximateFiatBalance = () => (
/* eslint-disable shopify/jsx-no-hardcoded-content */
<Text color="gray">
Expand All @@ -20,7 +23,13 @@ const WalletBalance = ({ totalBalance, openWalletModal }) => {
<Flex alignItems="center">
<Box mr={3} onClick={openWalletModal}>
<Button variant="secondary">
<Qrcode height="21px" width="21px" />
<Text
className="hint--top-right"
data-hint={formatMessage({ ...messages.qrcode_tooltip })}
fontWeight="light"
>
<Qrcode height="21px" width="21px" />
</Text>
</Button>
</Box>

Expand Down
1 change: 1 addition & 0 deletions renderer/components/Wallet/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export default defineMessages({
pay: 'Pay',
request: 'Receive',
menu_item_autopay: 'Autopay',
qrcode_tooltip: 'Deposit Bitcoin',
})
4 changes: 3 additions & 1 deletion translations/af-ZA.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "адрес {chain}",
"components.Wallet.menu_item_autopay": "Автомат. плащам",
"components.Wallet.pay": "Плащам",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Заяви",
"containers.UI.copied_to_clipbpard": "{name} е копирано в буферната ви памет",
"reducers.account.account_invalid_password": "Недействителна парола",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "Невъзможно намирането на файла за резервно копие ",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "Възелът на Lightning е синхронизиран",
"reducers.settings.settings_init_error": "Невъзможно зареждане на настройките: {error}",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "Непознато",
"reducers.settings.settings_init_error": "Невъзможно зареждане на настройките: {error}",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "Транзакция On-chain е получена!",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/ca-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "{chain} adresa",
"components.Wallet.menu_item_autopay": "Autopay",
"components.Wallet.pay": "Zaplatit",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Vyžádat",
"containers.UI.copied_to_clipbpard": "{name} byl zkopírován do vaší schránky",
"reducers.account.account_invalid_password": "Neplatné heslo",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "Nelze najít zálohovací soubor ",
"reducers.messages.neutrtino_synced_body": "Visa kdo? Jste nyní svým vlastním zpracovatelem plateb!",
"reducers.messages.neutrtino_synced_title": "Lightning uzel synchronizován",
"reducers.settings.settings_init_error": "Nastavení nelze načíst: {error}",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "Došlo k neopravitelné chybě.",
"reducers.payment.failed_incorrect_payment_details": "Nesprávné údaje o platbě (neznámý hash, neplatný amt nebo neplatný cltv delta).",
"reducers.payment.failed_insufficient_balance": "Nedostatečný místní zůstatek.",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "Platba byla úspěšně dokončena.",
"reducers.payment.terminated_early": "Pokus o platbu skončil brzy.",
"reducers.payment.unknown": "Neznámý",
"reducers.settings.settings_init_error": "Nastavení nelze načíst: {error}",
"reducers.transaction.transaction_received_body": "Máte štěstí, právě jste obdrželi novou on-chain transakci. Žárlím.",
"reducers.transaction.transaction_received_title": "On-chain transakce přijata!",
"reducers.transaction.transaction_sent_body": "Nerad je vidím mizet, ale rád je vidím odcházet. Vaše on-chain transakce byla úspěšně odeslána.",
Expand Down
4 changes: 3 additions & 1 deletion translations/da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "{chain} Adresse",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "Betal",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Anmodning",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "{chain} Adresse",
"components.Wallet.menu_item_autopay": "Autopay",
"components.Wallet.pay": "Bezahlen",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Anfrage",
"containers.UI.copied_to_clipbpard": "{name} wurde in deine Zwischenablage kopiert",
"reducers.account.account_invalid_password": "Ungültiges Passwort",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "Backup-Datei konnte nicht gefunden werden",
"reducers.messages.neutrtino_synced_body": "Visa wer? Du bist jetzt dein eigener Zahlungsabwickler!",
"reducers.messages.neutrtino_synced_title": "Lightning Node synchronisiert",
"reducers.settings.settings_init_error": "Einstellungen können nicht geladen werden: {error}",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "Ein nicht wiederherstellbarer Fehler ist aufgetreten.",
"reducers.payment.failed_incorrect_payment_details": "Zahlungsinformationen falsch (unbekannter Hash, ungültiger amtlicher oder ungültiger endgültiger cltv-Delta).",
"reducers.payment.failed_insufficient_balance": "Ungenügendes Guthaben.",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "Zahlung erfolgreich abgeschlossen.",
"reducers.payment.terminated_early": "Zahlungsversuch wurde vorzeitig beendet.",
"reducers.payment.unknown": "Unbekannt",
"reducers.settings.settings_init_error": "Einstellungen können nicht geladen werden: {error}",
"reducers.transaction.transaction_received_body": "Du Glückspilz hast eine neue on-chain Transaktion erhalten. Ich bin neidisch.",
"reducers.transaction.transaction_received_title": "On-chain Transaktion erhalten!",
"reducers.transaction.transaction_sent_body": "Und da geht sie einfach so... Transaktion erfolgreich gesendet.",
Expand Down
4 changes: 3 additions & 1 deletion translations/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "Διεύθυνση {chain}",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "Αποστολή πληρωμής",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Αίτηση πληρωμής",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "{chain} Address",
"components.Wallet.menu_item_autopay": "Autopay",
"components.Wallet.pay": "Pay",
"components.Wallet.qrcode_tooltip": "Deposit Bitcoin",
"components.Wallet.request": "Receive",
"containers.UI.copied_to_clipbpard": "{name} has been copied to your clipboard",
"reducers.account.account_invalid_password": "Invalid password",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "Unable to find backup file ",
"reducers.messages.neutrtino_synced_body": "Visa who? You're your own payment processor now!",
"reducers.messages.neutrtino_synced_title": "Lightning Node Synced",
"reducers.settings.settings_init_error": "Unable to load settings: {error}",
"reducers.messages.settings_init_error": "Unable to load settings: {error}",
"reducers.payment.failed_error": "A non-recoverable error has occured.",
"reducers.payment.failed_incorrect_payment_details": "Payment details incorrect (unknown hash, invalid amt or invalid final cltv delta).",
"reducers.payment.failed_insufficient_balance": "Insufficient local balance.",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "Payment completed successfully.",
"reducers.payment.terminated_early": "Payment attempt terminated early.",
"reducers.payment.unknown": "Unknown",
"reducers.settings.settings_init_error": "Unable to load settings: {error}",
"reducers.transaction.transaction_received_body": "Lucky you, you just received a new on-chain transaction. I'm jealous.",
"reducers.transaction.transaction_received_title": "On-chain Transaction Received!",
"reducers.transaction.transaction_sent_body": "Hate to see 'em go but love to watch 'em leave. Your on-chain transaction successfully sent.",
Expand Down
4 changes: 3 additions & 1 deletion translations/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "Dirección {chain}",
"components.Wallet.menu_item_autopay": "Autopago",
"components.Wallet.pay": "Pagar",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Solicitar",
"containers.UI.copied_to_clipbpard": "{name} se ha copiado a tu portapapeles",
"reducers.account.account_invalid_password": "Contraseña incorrecta",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "No se puede encontrar el archivo de respaldo ",
"reducers.messages.neutrtino_synced_body": "Visa ni que Visa? Ahora tu mismo eres tu propio procesador de pago!",
"reducers.messages.neutrtino_synced_title": "Nodo de Lightning Sincronizado",
"reducers.settings.settings_init_error": "No se puede cargar la configuración: {error}",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "Ha ocurrido un error no recuperable.",
"reducers.payment.failed_incorrect_payment_details": "Detalles de pago incorrectos (hash desconocido, total inválido o delta final cltv inválido).",
"reducers.payment.failed_insufficient_balance": "Balance local insuficiente.",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "Pago completado con éxito.",
"reducers.payment.terminated_early": "Intento de pago fue terminado temprano.",
"reducers.payment.unknown": "Desconocido",
"reducers.settings.settings_init_error": "No se puede cargar la configuración: {error}",
"reducers.transaction.transaction_received_body": "Vaya mira, acabas de recibir una nueva transacción en la cadena. Que envidia.",
"reducers.transaction.transaction_received_title": "¡Transacción en cadena recibida!",
"reducers.transaction.transaction_sent_body": "Me duele que se vayan pero me encanta verlos ir. Tu transacción on-chain se ha enviado con éxito.",
Expand Down
4 changes: 3 additions & 1 deletion translations/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "",
"components.Wallet.menu_item_autopay": "",
"components.Wallet.pay": "",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
4 changes: 3 additions & 1 deletion translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "Adresse {chain}",
"components.Wallet.menu_item_autopay": "Autopay",
"components.Wallet.pay": "Envoyer",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Recevoir",
"containers.UI.copied_to_clipbpard": "{name} a été copié dans votre presse-papiers",
"reducers.account.account_invalid_password": "Mot de passe invalide",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "Impossible de trouver un fichier de sauvegarde",
"reducers.messages.neutrtino_synced_body": "Visa, vous dites ? Vous êtes désormais votre propre système de paiement !",
"reducers.messages.neutrtino_synced_title": "Nœud Lightning synchronisé",
"reducers.settings.settings_init_error": "Impossible de charger les réglages : {error}",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "Une erreur non-récuperable est survenue.",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "Impossible de charger les réglages : {error}",
"reducers.transaction.transaction_received_body": "Vous venez de recevoir une transaction On-chain. La chance.",
"reducers.transaction.transaction_received_title": "Transaction On-chain reçue !",
"reducers.transaction.transaction_sent_body": "C'est si dur de les voir partir… Votre transaction On-chain a bien été envoyée.",
Expand Down
4 changes: 3 additions & 1 deletion translations/ga-IE.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
"components.Wallet.ReceiveModal.wallet_address": "Seoladh {chain}",
"components.Wallet.menu_item_autopay": "Autopay",
"components.Wallet.pay": "Íoc",
"components.Wallet.qrcode_tooltip": "",
"components.Wallet.request": "Iarratas",
"containers.UI.copied_to_clipbpard": "",
"reducers.account.account_invalid_password": "",
Expand Down Expand Up @@ -705,7 +706,7 @@
"reducers.messages.backup_not_found_error": "",
"reducers.messages.neutrtino_synced_body": "",
"reducers.messages.neutrtino_synced_title": "",
"reducers.settings.settings_init_error": "",
"reducers.messages.settings_init_error": "",
"reducers.payment.failed_error": "",
"reducers.payment.failed_incorrect_payment_details": "",
"reducers.payment.failed_insufficient_balance": "",
Expand All @@ -722,6 +723,7 @@
"reducers.payment.succeeded": "",
"reducers.payment.terminated_early": "",
"reducers.payment.unknown": "",
"reducers.settings.settings_init_error": "",
"reducers.transaction.transaction_received_body": "",
"reducers.transaction.transaction_received_title": "",
"reducers.transaction.transaction_sent_body": "",
Expand Down
Loading

0 comments on commit 1b22b19

Please sign in to comment.