From 98ce02508ce4ac050748672bb0c7113b4b85b74a Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 29 Oct 2019 15:26:03 -0400 Subject: [PATCH] show error message on bad password attempts --- package.json | 2 +- src/ui/component/syncPassword/index.js | 3 ++- src/ui/component/syncPassword/view.jsx | 4 +++- static/app-strings.json | 18 ++++++++++++++++-- yarn.lock | 4 ++-- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 893aa66cc..14ce2e568 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#e5440ba86078dcdfced490bc444810c8f57dc774", - "lbryinc": "lbryio/lbryinc#980c938310791365615662da2924107128109e4c", + "lbryinc": "lbryio/lbryinc#f962cdf31a4c36f7bdb8b71fc403a3377d58a460", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.14", diff --git a/src/ui/component/syncPassword/index.js b/src/ui/component/syncPassword/index.js index 4f969c492..09f199042 100644 --- a/src/ui/component/syncPassword/index.js +++ b/src/ui/component/syncPassword/index.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { doGetSync, selectGetSyncIsPending, selectUserEmail } from 'lbryinc'; +import { doGetSync, selectGetSyncIsPending, selectUserEmail, selectSyncApplyPasswordError } from 'lbryinc'; import { doSetClientSetting } from 'redux/actions/settings'; import { doSignOut } from 'redux/actions/app'; import SyncPassword from './view'; @@ -7,6 +7,7 @@ import SyncPassword from './view'; const select = state => ({ getSyncIsPending: selectGetSyncIsPending(state), email: selectUserEmail(state), + passwordError: selectSyncApplyPasswordError(state), }); const perform = dispatch => ({ diff --git a/src/ui/component/syncPassword/view.jsx b/src/ui/component/syncPassword/view.jsx index ff82ef58f..d145c88d0 100644 --- a/src/ui/component/syncPassword/view.jsx +++ b/src/ui/component/syncPassword/view.jsx @@ -11,11 +11,12 @@ type Props = { getSync: (?string) => void, getSyncIsPending: boolean, email: string, + passwordError: boolean, signOut: () => void, }; function SyncPassword(props: Props) { - const { getSync, getSyncIsPending, email, signOut } = props; + const { getSync, getSyncIsPending, email, signOut, passwordError } = props; const [password, setPassword] = React.useState(''); const [rememberPassword, setRememberPassword] = usePersistedState(true); @@ -35,6 +36,7 @@ function SyncPassword(props: Props) {
setPassword(e.target.value)} diff --git a/static/app-strings.json b/static/app-strings.json index a7c3d994b..a7003d477 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -829,5 +829,19 @@ "An email address is required to sync your account.": "An email address is required to sync your account.", "Sign Out": "Sign Out", "Follow more tags": "Follow more tags", - "Portuguese": "Portuguese" -} + "Portuguese": "Portuguese", + "Sign In to LBRY": "Sign In to LBRY", + "Check Your Email": "Check Your Email", + "sign in": "sign in", + "An email was sent to %email%. Follow the link to %verify_text%. This will update automatically.": "An email was sent to %email%. Follow the link to %verify_text%. This will update automatically.", + "Resend Email": "Resend Email", + "Sync your balance and preferences across devices.": "Sync your balance and preferences across devices.", + "Add Email": "Add Email", + "New email sent.": "New email sent.", + "Enter Your Wallet Password": "Enter Your Wallet Password", + "You set your wallet password when you previously installed LBRY. This may have been on different device.": "You set your wallet password when you previously installed LBRY. This may have been on different device.", + "Password for %email%": "Password for %email%", + "help guide": "help guide", + "If you are having issues, checkout our %help% or email us at %email%.": "If you are having issues, checkout our %help% or email us at %email%.", + "Wrong password for %email%": "Wrong password for %email%" +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 86a621f23..5ad48f554 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6851,9 +6851,9 @@ lbry-redux@lbryio/lbry-redux#e5440ba86078dcdfced490bc444810c8f57dc774: reselect "^3.0.0" uuid "^3.3.2" -lbryinc@lbryio/lbryinc#980c938310791365615662da2924107128109e4c: +lbryinc@lbryio/lbryinc#f962cdf31a4c36f7bdb8b71fc403a3377d58a460: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/980c938310791365615662da2924107128109e4c" + resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/f962cdf31a4c36f7bdb8b71fc403a3377d58a460" dependencies: reselect "^3.0.0"