From 2677cd17d8dcc3c824320498991d31c8cd54c452 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 13 Apr 2020 15:16:07 -0400 Subject: [PATCH] new signin/signup (#3960) * new signin/signup * cleanup and password reset * new flow working * cleanup * add 'autoComplete' props * fix prop * try to call email/confirm before resetting password * Dont use password reset token for email confirmation. * add password reset * password manager improvements * update lbryinc * cleanup * slightly improve close button on sign up page * moar fixes * fix password autofil Co-authored-by: Mark Beamer Jr --- .eslintrc.json | 1 + package.json | 4 +- static/app-strings.json | 5 +- ui/component/cardVerify/view.jsx | 2 +- ui/component/channelCreate/view.jsx | 2 +- ui/component/common/card.jsx | 4 + ui/component/common/error-text.jsx | 12 +- .../common/form-components/form-field.jsx | 4 +- ui/component/common/icon-custom.jsx | 5 + ui/component/common/nag.jsx | 26 +- ui/component/errorBoundary/view.jsx | 10 +- ui/component/header/index.js | 12 +- ui/component/header/view.jsx | 56 ++++- ui/component/invited/view.jsx | 2 +- ui/component/publishFormErrors/view.jsx | 2 +- ui/component/router/view.jsx | 8 +- ui/component/selectAsset/view.jsx | 2 +- ui/component/settingAccountPassword/index.js | 22 ++ ui/component/settingAccountPassword/view.jsx | 88 +++++++ ui/component/sideNavigation/view.jsx | 7 +- ui/component/splash/view.jsx | 3 +- ui/component/supportsLiquidate/view.jsx | 2 +- ui/component/userChannelFollowIntro/view.jsx | 82 +++---- ui/component/userEmail/index.js | 5 +- ui/component/userEmailNew/index.js | 17 +- ui/component/userEmailNew/view.jsx | 218 ++++++++++------- ui/component/userEmailReturning/index.js | 22 ++ ui/component/userEmailReturning/view.jsx | 111 +++++++++ ui/component/userEmailVerify/index.js | 5 +- ui/component/userEmailVerify/view.jsx | 79 +++--- ui/component/userFirstChannel/view.jsx | 83 ++++--- ui/component/userPasswordReset/index.js | 26 ++ ui/component/userPasswordReset/view.jsx | 107 +++++++++ ui/component/userPasswordSet/index.js | 16 ++ ui/component/userPasswordSet/view.jsx | 108 +++++++++ ui/component/userSignIn/index.js | 53 +--- ui/component/userSignIn/view.jsx | 227 +++--------------- ui/component/userSignInPassword/index.js | 22 ++ ui/component/userSignInPassword/view.jsx | 67 ++++++ ui/component/userSignOutButton/index.js | 14 +- ui/component/userSignOutButton/view.jsx | 18 +- ui/component/userSignUp/index.js | 52 ++++ ui/component/userSignUp/view.jsx | 215 +++++++++++++++++ ui/component/userTagFollowIntro/view.jsx | 65 ++--- ui/component/userVerify/view.jsx | 2 +- ui/component/walletSend/view.jsx | 2 +- ui/constants/icons.js | 1 + ui/constants/pages.js | 4 +- ui/modal/modalRemoveFile/view.jsx | 2 +- ui/modal/modalRevokeClaim/view.jsx | 2 +- ui/modal/modalWalletEncrypt/view.jsx | 2 +- ui/modal/walletReceive/view.jsx | 11 - ui/modal/walletSend/view.jsx | 10 - ui/page/passwordSet/index.js | 3 + ui/page/passwordSet/view.jsx | 12 + ui/page/rewards/view.jsx | 2 +- ui/page/settings/view.jsx | 4 +- ui/page/signIn/index.js | 11 +- ui/page/signInVerify/view.jsx | 80 +++--- ui/page/signUp/index.js | 3 + ui/page/signUp/view.jsx | 12 + ui/scss/component/_button.scss | 5 + ui/scss/component/_card.scss | 36 ++- ui/scss/component/_claim-list.scss | 5 + ui/scss/component/_header.scss | 10 + ui/scss/component/_main.scss | 18 +- ui/scss/component/_modal.scss | 6 +- ui/scss/component/nag.scss | 4 + ui/scss/component/section.scss | 57 ++++- ui/scss/init/_gui.scss | 6 +- ui/scss/themes/light.scss | 2 +- ui/util/saved-passwords.js | 3 +- yarn.lock | 12 +- 73 files changed, 1566 insertions(+), 652 deletions(-) create mode 100644 ui/component/settingAccountPassword/index.js create mode 100644 ui/component/settingAccountPassword/view.jsx create mode 100644 ui/component/userEmailReturning/index.js create mode 100644 ui/component/userEmailReturning/view.jsx create mode 100644 ui/component/userPasswordReset/index.js create mode 100644 ui/component/userPasswordReset/view.jsx create mode 100644 ui/component/userPasswordSet/index.js create mode 100644 ui/component/userPasswordSet/view.jsx create mode 100644 ui/component/userSignInPassword/index.js create mode 100644 ui/component/userSignInPassword/view.jsx create mode 100644 ui/component/userSignUp/index.js create mode 100644 ui/component/userSignUp/view.jsx delete mode 100644 ui/modal/walletReceive/view.jsx delete mode 100644 ui/modal/walletSend/view.jsx create mode 100644 ui/page/passwordSet/index.js create mode 100644 ui/page/passwordSet/view.jsx create mode 100644 ui/page/signUp/index.js create mode 100644 ui/page/signUp/view.jsx diff --git a/.eslintrc.json b/.eslintrc.json index 8c1d7d658..50e4be5cb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -30,6 +30,7 @@ "one-var": 0, "prefer-promise-reject-errors": 0, "react/jsx-indent": 0, + "react/jsx-no-comment-textnodes": 0, "react-hooks/exhaustive-deps": "warn", "react-hooks/rules-of-hooks": "error", "react/no-unescaped-entities": 0, diff --git a/package.json b/package.json index 28cb90b9b..47eb26d92 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@babel/register": "^7.0.0", "@exponent/electron-cookies": "^2.0.0", "@hot-loader/react-dom": "^16.8", - "@lbry/components": "^4.0.1", + "@lbry/components": "^4.1.2", "@reach/menu-button": "0.7.4", "@reach/rect": "^0.2.1", "@reach/tabs": "^0.1.5", @@ -131,7 +131,7 @@ "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#1097a63d44a20b87e443fbaa48f95fe3ea5e3f70", - "lbryinc": "lbryio/lbryinc#0addc624db54000b0447f4539f91f5758d26eef3", + "lbryinc": "lbryio/lbryinc#12aefaa14343d2f3eac01f2683701f58e53f1848", "lint-staged": "^7.0.2", "localforage": "^1.7.1", "lodash-es": "^4.17.14", diff --git a/static/app-strings.json b/static/app-strings.json index be009501c..2981c0ccd 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1116,5 +1116,8 @@ "Repost %count%": "Repost %count%", "File Description": "File Description", "View %count% reposts": "View %count% reposts", - "Preparing your content": "Preparing your content" + "Preparing your content": "Preparing your content", + "Already have an account? %sign_in%": "Already have an account? %sign_in%", + "Sign in with a password (optional)": "Sign in with a password (optional)", + "Don't have an account? %sign_up%": "Don't have an account? %sign_up%" } diff --git a/ui/component/cardVerify/view.jsx b/ui/component/cardVerify/view.jsx index 901ed4963..904973481 100644 --- a/ui/component/cardVerify/view.jsx +++ b/ui/component/cardVerify/view.jsx @@ -165,7 +165,7 @@ class CardVerify extends React.Component { return (
{scriptFailedToLoad && ( -
There was an error connecting to Stripe. Please try again later.
+
There was an error connecting to Stripe. Please try again later.
)}