From 98abb1c085f7ad432aa338c12549366762c09a0e Mon Sep 17 00:00:00 2001 From: Osvaldo Vega Date: Wed, 6 Mar 2019 15:51:31 +0100 Subject: [PATCH 1/3] :recycle: Update transactionStatus component --- i18n/locales/en/common.json | 12 ++- jest.config.js | 1 + .../images/icons-v2/transactionError.svg | 14 ++++ .../images/icons-v2/transactionSuccess.svg | 11 +++ src/components/app/variablesV2.css | 2 + src/components/customRoute/customRoute.js | 2 +- .../offlineWrapper/offlineWrapper.css | 4 - src/components/sendV2/form/form.js | 2 +- src/components/sendV2/index.js | 1 - src/components/sendV2/send.css | 4 + src/components/sendV2/send.js | 10 +++ src/components/sendV2/send.test.js | 42 +++++++++- .../sendV2/transactionStatus/index.js | 17 ++++ .../transactionStatus/transactionStatus.css | 80 ++++++++++++++++++ .../transactionStatus/transactionStatus.js | 81 +++++++++++++++++++ .../transactionStatus.test.js | 66 +++++++++++++++ src/utils/svgIcons.js | 28 ++++--- 17 files changed, 354 insertions(+), 23 deletions(-) create mode 100644 src/assets/images/icons-v2/transactionError.svg create mode 100644 src/assets/images/icons-v2/transactionSuccess.svg create mode 100644 src/components/sendV2/transactionStatus/index.js create mode 100644 src/components/sendV2/transactionStatus/transactionStatus.css create mode 100644 src/components/sendV2/transactionStatus/transactionStatus.js create mode 100644 src/components/sendV2/transactionStatus/transactionStatus.test.js diff --git a/i18n/locales/en/common.json b/i18n/locales/en/common.json index 0dc4059bc9..d1bdccade7 100644 --- a/i18n/locales/en/common.json +++ b/i18n/locales/en/common.json @@ -12,6 +12,7 @@ "About": "About", "Academy": "Academy", "Access extra features": "Access extra features", + "Account Balance": "Account Balance", "Account Info": "Account Info", "Account initialization": "Account initialization", "Accounts on Ledger": "Accounts on Ledger", @@ -37,7 +38,6 @@ "Amount": "Amount", "Amount (LSK)": "Amount (LSK)", "Amount of transaction": "Amount of transaction", - "Amount of trasaction": "Amount of trasaction", "Amount transfered": "Amount transfered", "An error occoured while rendering this page": "An error occoured while rendering this page", "An error occurred while creating the transaction.": "An error occurred while creating the transaction.", @@ -48,6 +48,7 @@ "Are you certain of your choice?": "Are you certain of your choice?", "Auto-logout": "Auto-logout", "Back": "Back", + "Back to wallet": "Back to wallet", "Backup your Passphrase": "Backup your Passphrase", "Balance": "Balance", "Become a delegate": "Become a delegate", @@ -208,6 +209,7 @@ "Invalid address": "Invalid address", "Invalid amount": "Invalid amount", "Is Blockchain Secure?": "Is Blockchain Secure?", + "Is the problem presisting?": "Is the problem presisting?", "It is highly recommended to delete the PDF and remove it from your trash after printing.": "It is highly recommended to delete the PDF and remove it from your trash after printing.", "It is recommended that you initialize your Lisk ID.": "It is recommended that you initialize your Lisk ID.", "It will cost you only the usual {{fee}} LSK transaction fee.": "It will cost you only the usual {{fee}} LSK transaction fee.", @@ -216,6 +218,7 @@ "Keep track of any Lisk ID balance. Only you will see who you bookmarked.": "Keep track of any Lisk ID balance. Only you will see who you bookmarked.", "LSK": "LSK", "LSK received": "LSK received", + "Last Transaction": "Last Transaction", "Later": "Later", "Latest activity": "Latest activity", "Learn about blockchain with our comprehensive knowledge base.": "Learn about blockchain with our comprehensive knowledge base.", @@ -337,6 +340,7 @@ "Remove from bookmarks": "Remove from bookmarks", "Removed Votes": "Removed Votes", "Report the error via E-Mail": "Report the error via E-Mail", + "Report the error via email": "Report the error via email", "Request": "Request", "Request LSK": "Request LSK", "Requested amount": "Requested amount", @@ -397,6 +401,7 @@ "Sign in": "Sign in", "Sign in with a Passphrase": "Sign in with a Passphrase", "Simply scan the QR code using the Lisk Mobile app or any other QR code reader": "Simply scan the QR code using the Lisk Mobile app or any other QR code reader", + "Since Last Visit": "Since Last Visit", "Sorry": "Sorry", "Standby": "Standby", "Start here": "Start here", @@ -482,6 +487,7 @@ "Votes submitted": "Votes submitted", "Voting": "Voting", "Wallet": "Wallet", + "Wallet overview": "Wallet overview", "We recommend including date & time or a specific keyword.": "We recommend including date & time or a specific keyword.", "We strongly recommend to store your passphrase in a safe place, such as on a password manager or paperwallet.": "We strongly recommend to store your passphrase in a safe place, such as on a password manager or paperwallet.", "Welcome back": "Welcome back", @@ -547,11 +553,13 @@ "e.g. 12345.6": "e.g. 12345.6", "e.g. 1234523423L or John Doe": "e.g. 1234523423L or John Doe", "for full access": "for full access", + "from": "from", "if the problem persists": "if the problem persists", "longer passphrases": "longer passphrases", "missed": "missed", "or": "or", "tab or space ": "tab or space ", + "to": "to", "to go to the next field.": "to go to the next field.", "to your Lisk Hub. It is provided during account registration.": "to your Lisk Hub. It is provided during account registration.", "with a second passphrase": "with a second passphrase", @@ -562,5 +570,7 @@ "{{count}} delegate(s) selected to vote_plural": "{{count}} delegates selected to vote", "{{length}} extra characters": "{{length}} extra characters", "{{length}} out of {{total}} characters left": "{{length}} out of {{total}} characters left", + "{{paragraph}}": "{{paragraph}}", + "{{title}}": "{{title}}", "{{title}} has been added to your Dashboard.": "{{title}} has been added to your Dashboard." } diff --git a/jest.config.js b/jest.config.js index d1006b03c5..9b42e3b7ee 100644 --- a/jest.config.js +++ b/jest.config.js @@ -145,6 +145,7 @@ module.exports = { globals: { PRODUCTION: true, TEST: true, + VERSION: '', }, coverageReporters: [ 'text', diff --git a/src/assets/images/icons-v2/transactionError.svg b/src/assets/images/icons-v2/transactionError.svg new file mode 100644 index 0000000000..566400790b --- /dev/null +++ b/src/assets/images/icons-v2/transactionError.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/assets/images/icons-v2/transactionSuccess.svg b/src/assets/images/icons-v2/transactionSuccess.svg new file mode 100644 index 0000000000..d6d8689d3d --- /dev/null +++ b/src/assets/images/icons-v2/transactionSuccess.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/components/app/variablesV2.css b/src/components/app/variablesV2.css index 68ccb4470b..62cbecd52a 100644 --- a/src/components/app/variablesV2.css +++ b/src/components/app/variablesV2.css @@ -46,6 +46,7 @@ or "warn/action" ineastd of "red/green" --font-size-h5: 20px; --font-size-h6: 16px; --font-size-small: 10px; + --font-size-large: 24px; --heading-font: 'gilroy', 'Open Sans', sans-serif; --content-font: 'gilroy-regular', 'Open Sans', sans-serif; --font-weight-normal: 400; @@ -59,6 +60,7 @@ or "warn/action" ineastd of "red/green" --button-font-size: var(--paragraph-font-size-s); --button-font-size-s: 12px; --font-size-title: 18px; + --font-size-small-secondary: 13px; /************************* Sizes diff --git a/src/components/customRoute/customRoute.js b/src/components/customRoute/customRoute.js index 730056941f..c2475f84b0 100644 --- a/src/components/customRoute/customRoute.js +++ b/src/components/customRoute/customRoute.js @@ -16,7 +16,7 @@ const CustomRoute = ({ Piwik.tracking(rest.history, settings); return ((isPrivate && isAuthenticated) || !isPrivate ? -
+
diff --git a/src/components/offlineWrapper/offlineWrapper.css b/src/components/offlineWrapper/offlineWrapper.css index 1731ed7ccf..a1e8feaf74 100644 --- a/src/components/offlineWrapper/offlineWrapper.css +++ b/src/components/offlineWrapper/offlineWrapper.css @@ -2,7 +2,3 @@ opacity: 0.5; pointer-events: none; } - -.setHeight { - height: 100%; -} diff --git a/src/components/sendV2/form/form.js b/src/components/sendV2/form/form.js index ae9d52a4c2..6b21680c6b 100644 --- a/src/components/sendV2/form/form.js +++ b/src/components/sendV2/form/form.js @@ -305,7 +305,7 @@ class Form extends React.Component {