From e9bad9f52e58ec1ea850cebc105a4060a518da33 Mon Sep 17 00:00:00 2001 From: BFlat Date: Sat, 6 Jul 2024 01:56:13 +0700 Subject: [PATCH] redeem and login flow improvement (#599) * update * fix * fix * fakeyou landing title padding fix --- .../DeviceNotSupported/DeviceNotSupported.tsx | 59 ++-- .../StorytellerStudioCTA.tsx | 108 +++++--- .../src/components/layout/TopNav/TopNav.tsx | 10 +- .../fakeyou.com/src/scss/site-refresh.scss | 19 +- .../fakeyou.com/src/v2/view/nav/FooterNav.tsx | 4 +- .../view/pages/beta_key/RedeemBetaKeyPage.tsx | 69 +++-- .../landing/fakeyou/FakeYouLandingHeader.tsx | 2 +- .../ScrollingSceneCarousel.tsx | 6 +- .../src/v2/view/pages/login/LoginPage.tsx | 158 +++++++---- .../src/v2/view/pages/signup/SignupPage.tsx | 255 ++++++++++-------- 10 files changed, 433 insertions(+), 257 deletions(-) diff --git a/packages/fakeyou.com/src/components/common/DeviceNotSupported/DeviceNotSupported.tsx b/packages/fakeyou.com/src/components/common/DeviceNotSupported/DeviceNotSupported.tsx index 2cc3a584fc..ace3c82ea0 100644 --- a/packages/fakeyou.com/src/components/common/DeviceNotSupported/DeviceNotSupported.tsx +++ b/packages/fakeyou.com/src/components/common/DeviceNotSupported/DeviceNotSupported.tsx @@ -9,7 +9,15 @@ import { import Button from "../Button"; import RemixScenes from "../RemixScenes"; -export default function DeviceNotSupported() { +interface DeviceNotSupportedProps { + showButton?: boolean; + showRemixScenes?: boolean; +} + +export default function DeviceNotSupported({ + showButton = true, + showRemixScenes = true, +}: DeviceNotSupportedProps) { return ( @@ -36,30 +44,37 @@ export default function DeviceNotSupported() { Storyteller.ai on a desktop computer to access Storyteller Studio.

- {/*
-
*/} -
-

- You'll be able to create creative scenes like these... -

+ + {showRemixScenes && ( + <> +
+

+ You'll be able to create creative scenes like these... +

+ + )} - + {showRemixScenes && ( + <> + -

- Log into Storyteller.ai on a - desktop computer to start creating now! -

- -
-
+

+ Log into Storyteller.ai on + a desktop computer to start creating now! +

+ + )} + {showButton && ( +
+
+ )}
); diff --git a/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx b/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx index 7249010eed..0ef1c11090 100644 --- a/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx +++ b/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx @@ -8,7 +8,21 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Panel from "../Panel"; import { get } from "local-storage"; -const StorytellerStudioCTA = () => { +interface StorytellerStudioCTAProps { + showButton?: boolean; + showIcon?: boolean; + subText?: string; + title?: string; + showMarquee?: boolean; +} + +const StorytellerStudioCTA = ({ + showButton = true, + subText, + title, + showMarquee = true, + showIcon = true, +}: StorytellerStudioCTAProps) => { const { open } = useModal(); const openModal = () => open({ @@ -21,43 +35,47 @@ const StorytellerStudioCTA = () => {

- Storyteller - Studio -

-

- Harness the power of AI to bring your creative visions to life. - Craft stunning visuals by designing your own 3D scenes. Take control - and effortlessly produce movies in any style you envision. -

-
- {!get("firstFormIsSubmitted") || - !get("secondFormIsSubmitted") ? ( - <> - {!get("firstFormIsSubmitted") ? ( -
+ {title ? title : "Storyteller Studio"} + +

+ {subText + ? subText + : "Harness the power of AI to bring your creative visions to life. Craft stunning visuals by designing your own 3D scenes. Take control and effortlessly produce movies in any style you like."} +

+ {showButton && ( +
+ {!get("firstFormIsSubmitted") || + !get("secondFormIsSubmitted") ? ( + <> + {!get("firstFormIsSubmitted") ? ( +
+ )}
{
-
- -
-
- -
+ {showMarquee && ( + <> +
+ +
+
+ +
+ + )} ); }; diff --git a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx index ebe44191d7..b9ad3b1738 100644 --- a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx +++ b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx @@ -208,7 +208,9 @@ export default function TopNav({ if ( (domain.titlePart === "Storyteller AI" && isOnLandingPage) || isOnBetaKeyRedeemPage || - isOnCreatorOnboardingPage + isOnCreatorOnboardingPage || + isOnLoginPage || + isOnSignUpPage ) { pageContentWrapper.style.padding = "0px"; } else { @@ -221,6 +223,8 @@ export default function TopNav({ isOnBetaKeyRedeemPage, isOnWaitlistSuccessPage, isOnCreatorOnboardingPage, + isOnLoginPage, + isOnSignUpPage, ]); if ( @@ -258,7 +262,9 @@ export default function TopNav({ if ( isOnBetaKeyRedeemPage || isOnWaitlistSuccessPage || - isOnCreatorOnboardingPage + isOnCreatorOnboardingPage || + isOnSignUpPage || + isOnLoginPage ) { return null; } diff --git a/packages/fakeyou.com/src/scss/site-refresh.scss b/packages/fakeyou.com/src/scss/site-refresh.scss index aa148d3d8d..b0cb1e1615 100644 --- a/packages/fakeyou.com/src/scss/site-refresh.scss +++ b/packages/fakeyou.com/src/scss/site-refresh.scss @@ -505,10 +505,19 @@ styles with important tags: } .login-panel { - max-width: 800px !important; + max-width: 480px !important; backdrop-filter: blur(5px); } + .auth-page-left { + height: auto; + } + + .auth-page-right { + padding: 1.25rem; + padding-bottom: 5rem; + } + .sub-title { font-weight: 500; padding-bottom: 0.5rem; @@ -1771,6 +1780,14 @@ textarea { } } + .auth-page-left { + height: 100vh; + } + + .auth-page-right { + padding: 5.2rem; + } + .lead { font-size: 18px; } diff --git a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx index 4c3b09ca2c..e6f44a7dfc 100644 --- a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx +++ b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx @@ -138,8 +138,10 @@ function FooterNav(props: Props) { const isOnCreatorOnboardingPage = window.location.pathname.includes( "/creator-onboarding" ); + const isOnLoginPage = window.location.pathname.includes("/login"); + const isOnSignUpPage = window.location.pathname.includes("/signup"); - if (isOnCreatorOnboardingPage) { + if (isOnCreatorOnboardingPage || isOnLoginPage || isOnSignUpPage) { return null; } diff --git a/packages/fakeyou.com/src/v2/view/pages/beta_key/RedeemBetaKeyPage.tsx b/packages/fakeyou.com/src/v2/view/pages/beta_key/RedeemBetaKeyPage.tsx index 8d73fed449..d6d533f433 100644 --- a/packages/fakeyou.com/src/v2/view/pages/beta_key/RedeemBetaKeyPage.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/beta_key/RedeemBetaKeyPage.tsx @@ -10,6 +10,8 @@ import { RedeemBetaKey } from "@storyteller/components/src/api/beta_key/RedeemBe import { Link, useHistory, useParams } from "react-router-dom"; import { useSession } from "hooks"; import LoadingSpinner from "components/common/LoadingSpinner"; +import StorytellerStudioCTA from "components/common/StorytellerStudioCTA"; +import { isMobile } from "react-device-detect"; export default function RedeemBetaKeyPage() { const { token: pageToken } = useParams<{ token: string }>(); @@ -17,7 +19,7 @@ export default function RedeemBetaKeyPage() { const [loading, setLoading] = useState(false); const [showAlert, setShowAlert] = useState(false); const history = useHistory(); - const { user, loggedIn, sessionFetched } = useSession(); + const { loggedIn, sessionFetched } = useSession(); useEffect(() => { if (sessionStorage.getItem("redirected") === "true") { @@ -68,8 +70,14 @@ export default function RedeemBetaKeyPage() { if (!loggedIn) { return ( - -
+
+ Storyteller Logo
+
-
-
+ + + {isMobile && ( + +
+ Note: + + Storyteller Studio is not optimized for mobile devices yet. You + can redeem your beta key here first then access full features at{" "} + Storyteller.ai on a desktop + computer after redemption. + +
+
+ )} + + +
+ +
+
+ ); } - console.log(user); - return ( <> @@ -154,6 +186,7 @@ export default function RedeemBetaKeyPage() { }} required={true} className="text-center w-100 fs-5" + autoFocus={true} /> {showAlert && ( diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/fakeyou/FakeYouLandingHeader.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/fakeyou/FakeYouLandingHeader.tsx index 6bc3112605..999d28bc36 100644 --- a/packages/fakeyou.com/src/v2/view/pages/landing/fakeyou/FakeYouLandingHeader.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/landing/fakeyou/FakeYouLandingHeader.tsx @@ -38,7 +38,7 @@ export default function FakeYouLandingHeader({
-

+

{t("heroTitle")}

diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel.tsx index d5e8860829..5db9b77b08 100644 --- a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel.tsx @@ -6,6 +6,7 @@ import Marquee from "react-fast-marquee"; interface ScrollingSceneCarouselProps { small?: boolean; showGradient?: boolean; + gradientColor?: string; pauseOnHover?: boolean; className?: string; } @@ -22,6 +23,7 @@ interface MediaItem { export default function ScrollingSceneCarousel({ small, showGradient = true, + gradientColor, pauseOnHover = false, className, }: ScrollingSceneCarouselProps) { @@ -67,7 +69,7 @@ export default function ScrollingSceneCarousel({ gradient={showGradient ? true : false} // this component doesn't seem to like string values and was causing errors // so hex is converted to an RGB array -VH - gradientColor="#1a1a27" + gradientColor={gradientColor ? gradientColor : "#1a1a27"} //gradientColor={[26, 26, 29]} gradientWidth={small ? 80 : 200} speed={small ? 100 : 50} @@ -93,7 +95,7 @@ export default function ScrollingSceneCarousel({ {!small && ( -

Login to {domain.titlePart}

+
+
+
+ + Storyteller Logo + +

+ Check out what our new AI creation engine can make! +

- - {errorWarning} - -
-
-
- -
- - - - -
- {/*

*/} -
- -
- -
- - - - -
-

- - Forgot your password? - - - Don't have an account? Sign up - -

-
+
+
- - - - +
+ +
+ + {!betaKeyRedirect && ( +

+ Interested? Join the waitlist at{" "} + + Storyteller.ai + +

+ )} +
+ +
+

+ {betaKeyRedirect + ? "Login to Redeem Beta Key" + : `Login to ${domain.titlePart}`} +

+ + + {errorWarning} + +
+
+
+ +
+ + + + +
+ {/*

*/} +
+ +
+ +
+ + + + +
+

+ + Forgot your password? + + +

+
No account?
+
+ Don't have an account? +
+ Sign up +
+ +

+
+
+ +
+
+
+
+
); } diff --git a/packages/fakeyou.com/src/v2/view/pages/signup/SignupPage.tsx b/packages/fakeyou.com/src/v2/view/pages/signup/SignupPage.tsx index daba2b2aaa..0974947f3b 100644 --- a/packages/fakeyou.com/src/v2/view/pages/signup/SignupPage.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/signup/SignupPage.tsx @@ -17,9 +17,9 @@ import { WebUrl } from "../../../../common/WebUrl"; import { BeginStripeCheckoutFlow } from "../../../../common/BeginStripeCheckoutFlow"; import { usePrefixedDocumentTitle } from "../../../../common/UsePrefixedDocumentTitle"; import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient"; -import Container from "components/common/Container"; import Panel from "components/common/Panel"; import { useDomainConfig } from "context/DomainConfigContext"; +import ScrollingSceneCarousel from "../landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel"; enum FieldTriState { EMPTY_FALSE, @@ -259,6 +259,8 @@ function SignupPage(props: Props) { return false; }; + const redirectLink = queryParams.get("redirect"); + const afterSignupRedirect = async () => { const maybeInternalPlanKey = parsedQueryString["sub"] as string | undefined; @@ -266,14 +268,14 @@ function SignupPage(props: Props) { return await BeginStripeCheckoutFlow(maybeInternalPlanKey); } - const redirectLink = queryParams.get("redirect"); - let redirectUrl = redirectLink || WebUrl.pricingPageWithReferer("signup"); history.push(redirectUrl); return true; }; + const betaKeyRedirect = redirectLink?.includes("/beta-key/redeem"); + usePrefixedDocumentTitle("Create an account"); if (props.sessionWrapper.isLoggedIn()) { @@ -354,114 +356,149 @@ function SignupPage(props: Props) { } return ( - -

Sign Up for {domain.titlePart}

+
+
+
+ + Storyteller Logo + +

+ Check out what our new AI creation engine can make! +

- -
-
-
- -
- - - - -
-

{usernameInvalidReason}

-
-
- -
- - - - -
-

{emailInvalidReason}

-
-
- -
- - - - -
-

{passwordInvalidReason}

-
-
- -
- - - - -
-

- {passwordConfirmationInvalidReason} -

-
- {/*
- Remember your password! We don't have - password reset currently, and it'll be a few more weeks before - it's added (there are more important features to work on). If - you lose your password, please let us know in Discord. -
*/} - -

- - Already have an account?{" "} - Log in instead. - -

+
+
- - - +
+ +
+ + {!betaKeyRedirect && ( +

+ Interested? Join the waitlist at{" "} + + Storyteller.ai + +

+ )} +
+
+

+ {betaKeyRedirect + ? "Sign Up to Redeem Beta Key" + : `Sign Up for ${domain.titlePart}`} +

+ + +
+
+
+ +
+ + + + +
+

{usernameInvalidReason}

+
+
+ +
+ + + + +
+

{emailInvalidReason}

+
+
+ +
+ + + + +
+

{passwordInvalidReason}

+
+
+ +
+ + + + +
+

+ {passwordConfirmationInvalidReason} +

+
+ {/*
+ Remember your password! We don't have + password reset currently, and it'll be a few more weeks before + it's added (there are more important features to work on). If + you lose your password, please let us know in Discord. +
*/} + +

+ + Already have an account?{" "} + Log in instead. + +

+
+
+
+
+
+
); }