diff --git a/__tests__/__snapshots__/About.snapshot.tsx.snap b/__tests__/__snapshots__/About.snapshot.tsx.snap index ab9ff64a4..2316e18d5 100644 --- a/__tests__/__snapshots__/About.snapshot.tsx.snap +++ b/__tests__/__snapshots__/About.snapshot.tsx.snap @@ -142,7 +142,49 @@ exports[`Component About - test About - snapshot 1`] = ` } } > - + + + + + text translated + + + + + - - value - + + value + + `; diff --git a/__tests__/__snapshots__/Info.snapshot.tsx.snap b/__tests__/__snapshots__/Info.snapshot.tsx.snap index cfb344ce4..8ca978f08 100644 --- a/__tests__/__snapshots__/Info.snapshot.tsx.snap +++ b/__tests__/__snapshots__/Info.snapshot.tsx.snap @@ -176,56 +176,36 @@ exports[`Component Info - test Info - snapshot 1`] = ` } } /> - - translated text translated text - - - - - translated text - - - mob-release... - + + translated text translated text + + - - 3.3.3.0 - + + 3.3.3.0 + + - - https://zcash.es - + + https://zcash.es + + - - Mainnet - + + Mainnet + + - - 2000100 - + + 2000100 + + diff --git a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap index 6f98e5a39..51b8e8845 100644 --- a/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap +++ b/__tests__/__snapshots__/SyncReport.snapshot.tsx.snap @@ -176,18 +176,36 @@ exports[`Component SyncReport - test SyncReport - snapshot 1`] = ` } } /> - - 1 - (translated text) - + + 1 - (translated text) + + - - translated text5translated text50 - + + translated text5translated text50 + + - - 100 - + + 100 + + - - 122 - + + 122 + + - - translated text1800100translated text1900100 - + + translated text1800100translated text1900100 + + diff --git a/app/translations/en.json b/app/translations/en.json index 2cdf17bc2..e3184ee86 100644 --- a/app/translations/en.json +++ b/app/translations/en.json @@ -18,6 +18,7 @@ "restarting": "Error connecting to the Server, the App will restart in a few seconds.", "change-privacy": "New privacy policy: ", "change-privacy-legend": ".\nTap to reveal the hidden values.", + "txtcopied": "Text copied to Clipboard", "insight": { "title": "Financial Insight", "no-data": "There is no data in your Wallet that fit the graph selected.", @@ -264,8 +265,8 @@ "text-readonly-server": "Before changing another server, carefully write down this seed phrase. It is the only way you can restore/access your current wallet.", "text-no-readonly": "Enter your seed phrase (24 words)", "tapcopy": "Tap to copy", - "tapcopy-seed-message": "Copied Seed to Clipboard", - "tapcopy-birthday-message": "Copied Birthday to Clipboard", + "tapcopy-seed-message": "Seed copied to Clipboard", + "tapcopy-birthday-message": "Birthday copied to Clipboard", "birthday-readonly": "Wallet Birthday", "birthday-no-readonly": "Block height of first transaction. (It's OK, if you don't know)\nValue range between ", "change-warning": "If you change to another wallet, you will no longer have access to this wallet without the seed phrase.", @@ -380,12 +381,12 @@ "confirmations": "Confirmations", "txid": "Transaction ID", "viewexplorer": "View on block explorer", - "txcopied": "Copied TxID to Clipboard", + "txcopied": "TxID copied to Clipboard", "address": "Address", - "addresscopied": "Copied Address to Clipboard", + "addresscopied": "Address copied to Clipboard", "amount": "Amount", "memo": "Memo", - "memocopied": "Copied Memo to Clipboard", + "memocopied": "Memo copied to Clipboard", "txfee": "Transaction Fee", "title-acc": "Wallet Screen", "list-acc": "Transactions' List", @@ -475,7 +476,7 @@ "privkey": "Spending/Private ", "viewkey": "Viewing Key ", "nokey": "No Key", - "tapcopy-message": "Copied Key to Clipboard", + "tapcopy-message": "Key copied to Clipboard", "title": "Key", "address": "Address", "text-readonly": "Before closing this screen, carefully write down this viewing key. It is the only way you can restore/access your current wallet.", diff --git a/app/translations/es.json b/app/translations/es.json index ff15d6d7d..baadd18ad 100644 --- a/app/translations/es.json +++ b/app/translations/es.json @@ -18,6 +18,7 @@ "restarting": "Error conectando con el servidor, la Aplicación se reiniciará en breves segundos.", "change-privacy": "Nueva Política de Privacidad: ", "change-privacy-legend": ".\nPulsar para revelar los valores ocultos.", + "txtcopied": "Texto copiado al Portapapeles", "insight": { "title": "Visión Financiera", "no-data": "No hay datos en tu Monedero que concuerden con el gráfico seleccionado.", diff --git a/components/About/About.tsx b/components/About/About.tsx index f138a314c..1358057e9 100644 --- a/components/About/About.tsx +++ b/components/About/About.tsx @@ -8,13 +8,14 @@ import Button from '../Components/Button'; import { ThemeType } from '../../app/types'; import { ContextAppLoaded } from '../../app/context'; import Header from '../Header'; +import DetailLine from '../Components/DetailLine'; type AboutProps = { closeModal: () => void; }; const About: React.FunctionComponent = ({ closeModal }) => { const context = useContext(ContextAppLoaded); - const { translate } = context; + const { info, translate } = context; const { colors } = useTheme() as unknown as ThemeType; const arrayTxtObject = translate('about.copyright'); @@ -48,11 +49,15 @@ const About: React.FunctionComponent = ({ closeModal }) => { justifyContent: 'flex-start', padding: 20, }}> - {arrayTxt.map((txt: string) => ( - - {txt} - - ))} + {arrayTxt[0]} + + + {arrayTxt.map((txt: string, ind: number) => ( + + {ind !== 0 && {txt}} + + ))} + = ({ label, value, children, testID }) => { const { colors } = useTheme() as unknown as ThemeType; + const context = useContext(ContextAppLoaded); + const { addLastSnackbar, translate } = context; return ( {label} - {value && ( - - {value} - + {!!value && ( + { + Clipboard.setString(value); + addLastSnackbar({ + message: translate('txtcopied') as string, + type: 'Primary', + duration: 'short', + }); + }}> + + {value} + + )} {children} diff --git a/components/Info/Info.tsx b/components/Info/Info.tsx index d24d4d278..d6fbc4f3a 100644 --- a/components/Info/Info.tsx +++ b/components/Info/Info.tsx @@ -51,7 +51,6 @@ const Info: React.FunctionComponent = ({ closeModal, setZecPrice }) = label={translate('info.version') as string} value={translate('zingo') + ' ' + translate('version')} /> -