mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 22:32:13 +00:00
redeem and login flow improvement (#599)
* update * fix * fix * fakeyou landing title padding fix
This commit is contained in:
1 parent
8c338609eb
commit
e9bad9f52e
10 files changed
+433
-257
No files matched your search
+37
-22
@@ -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 (
|
||||
<Container type="panel">
|
||||
<Panel padding={true} className="py-5 d-flex flex-column gap-4">
|
||||
@@ -36,30 +44,37 @@ export default function DeviceNotSupported() {
|
||||
<b className="text-red fw-medium"> Storyteller.ai</b> on a desktop
|
||||
computer to access Storyteller Studio.
|
||||
</p>
|
||||
{/* <div className="d-flex justify-content-center mt-2">
|
||||
<Button to="/" label="Back to Homepage" icon={faArrowLeft} />
|
||||
</div> */}
|
||||
<hr className="w-100" />
|
||||
<p className="px-2 fw-medium fs-5">
|
||||
You'll be able to create creative scenes like these...
|
||||
</p>
|
||||
|
||||
{showRemixScenes && (
|
||||
<>
|
||||
<hr className="w-100" />
|
||||
<p className="px-2 fw-medium fs-5">
|
||||
You'll be able to create creative scenes like these...
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<RemixScenes allowRemix={false} />
|
||||
{showRemixScenes && (
|
||||
<>
|
||||
<RemixScenes allowRemix={false} />
|
||||
|
||||
<p className="px-2 fw-medium fs-5 text-center">
|
||||
Log into <b className="text-red fw-medium"> Storyteller.ai</b> on a
|
||||
desktop computer to start creating now!
|
||||
</p>
|
||||
|
||||
<div className="d-flex justify-content-center mt-3">
|
||||
<Button
|
||||
to="/"
|
||||
label="Back to Homepage"
|
||||
icon={faArrowLeft}
|
||||
variant="primary"
|
||||
/>
|
||||
</div>
|
||||
<p className="px-2 fw-medium fs-5 text-center">
|
||||
Log into <b className="text-red fw-medium"> Storyteller.ai</b> on
|
||||
a desktop computer to start creating now!
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
{showButton && (
|
||||
<div className="d-flex justify-content-center mt-3">
|
||||
<Button
|
||||
to="/"
|
||||
label="Back to Homepage"
|
||||
icon={faArrowLeft}
|
||||
variant="primary"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Panel>
|
||||
</Container>
|
||||
);
|
||||
|
||||
+65
-43
@@ -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 = () => {
|
||||
<div className="row py-3 pb-0 px-4 px-lg-5 py-lg-0 g-3 gx-lg-5">
|
||||
<div className="col-12 col-lg-6 pb-lg-3 d-flex flex-column justify-content-center ps-lg-5">
|
||||
<h1 className="fw-bold mb-3 text-center text-lg-start">
|
||||
<FontAwesomeIcon icon={faCube} className="fs-2 me-2" /> Storyteller
|
||||
Studio
|
||||
</h1>
|
||||
<p className="opacity-75 mb-4 text-center text-lg-start">
|
||||
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.
|
||||
</p>
|
||||
<div className="d-flex justify-content-center justify-content-lg-start gap-3">
|
||||
{!get<boolean>("firstFormIsSubmitted") ||
|
||||
!get<boolean>("secondFormIsSubmitted") ? (
|
||||
<>
|
||||
{!get<boolean>("firstFormIsSubmitted") ? (
|
||||
<Button
|
||||
label="Join the Waitlist"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
onClick={openModal}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
label="Get Access Sooner"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
to="/creator-onboarding"
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Button
|
||||
label="Visit Storyteller.ai"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
href="https://storyteller.ai/"
|
||||
/>
|
||||
{showIcon && (
|
||||
<FontAwesomeIcon icon={faCube} className="fs-2 me-3" />
|
||||
)}
|
||||
</div>
|
||||
{title ? title : "Storyteller Studio"}
|
||||
</h1>
|
||||
<p className="opacity-75 text-center text-lg-start">
|
||||
{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."}
|
||||
</p>
|
||||
{showButton && (
|
||||
<div className="d-flex justify-content-center justify-content-lg-start gap-3 mt-4">
|
||||
{!get<boolean>("firstFormIsSubmitted") ||
|
||||
!get<boolean>("secondFormIsSubmitted") ? (
|
||||
<>
|
||||
{!get<boolean>("firstFormIsSubmitted") ? (
|
||||
<Button
|
||||
label="Join the Waitlist"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
onClick={openModal}
|
||||
/>
|
||||
) : (
|
||||
<Button
|
||||
label="Get Access Sooner"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
to="/creator-onboarding"
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<Button
|
||||
label="Visit Storyteller.ai"
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
href="https://storyteller.ai/"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="col-12 col-lg-6 d-flex flex-column justify-content-center">
|
||||
<div
|
||||
@@ -90,12 +108,16 @@ const StorytellerStudioCTA = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="d-none d-lg-block">
|
||||
<ScrollingSceneCarousel showGradient={false} />
|
||||
</div>
|
||||
<div className="d-block d-lg-none">
|
||||
<ScrollingSceneCarousel showGradient={false} small={true} />
|
||||
</div>
|
||||
{showMarquee && (
|
||||
<>
|
||||
<div className="d-none d-lg-block">
|
||||
<ScrollingSceneCarousel showGradient={false} />
|
||||
</div>
|
||||
<div className="d-block d-lg-none">
|
||||
<ScrollingSceneCarousel showGradient={false} small={true} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</Panel>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 (
|
||||
<Container type="panel" className="narrow-container">
|
||||
<div className="d-flex flex-column align-items-center justify-content-center vh-100 gap-4">
|
||||
<div
|
||||
className="d-flex flex-column align-items-center justify-content-center"
|
||||
style={{ minHeight: "100vh" }}
|
||||
>
|
||||
<Container
|
||||
type="panel"
|
||||
className="narrow-container d-flex flex-column align-items-center justify-content-center gap-4 mt-5"
|
||||
>
|
||||
<img
|
||||
src="/fakeyou/Storyteller-Logo-1.png"
|
||||
alt="Storyteller Logo"
|
||||
@@ -85,6 +93,17 @@ export default function RedeemBetaKeyPage() {
|
||||
beta key.
|
||||
</p>
|
||||
<div className="d-flex gap-2 mt-2">
|
||||
<Button
|
||||
label="Sign Up"
|
||||
className="mt-3"
|
||||
onClick={() => {
|
||||
sessionStorage.setItem("redirected", "true");
|
||||
const signUpPath = pageToken
|
||||
? `/signup?redirect=/beta-key/redeem/${pageToken}`
|
||||
: "/signup?redirect=/beta-key/redeem/";
|
||||
history.push(signUpPath);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Login"
|
||||
className="mt-3"
|
||||
@@ -97,27 +116,40 @@ export default function RedeemBetaKeyPage() {
|
||||
}}
|
||||
variant="secondary"
|
||||
/>
|
||||
<Button
|
||||
label="Sign Up"
|
||||
className="mt-3"
|
||||
onClick={() => {
|
||||
sessionStorage.setItem("redirected", "true");
|
||||
const signUpPath = pageToken
|
||||
? `/signup?redirect=/beta-key/redeem/${pageToken}`
|
||||
: "/signup?redirect=/beta-key/redeem/";
|
||||
history.push(signUpPath);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
</div>
|
||||
</Container>
|
||||
</Container>
|
||||
|
||||
{isMobile && (
|
||||
<Container type="panel" className="px-4">
|
||||
<div className="text-center mt-5 px-lg-5 d-flex flex-column">
|
||||
<span className="text-red fw-medium fs-5">Note: </span>
|
||||
<span className="opacity-75">
|
||||
Storyteller Studio is not optimized for mobile devices yet. You
|
||||
can redeem your beta key here first then access full features at{" "}
|
||||
<span className="text-red">Storyteller.ai</span> on a desktop
|
||||
computer after redemption.
|
||||
</span>
|
||||
</div>
|
||||
</Container>
|
||||
)}
|
||||
|
||||
<Container type="panel" className="pt-lg-5">
|
||||
<div className="py-5">
|
||||
<StorytellerStudioCTA
|
||||
showButton={false}
|
||||
showMarquee={false}
|
||||
showIcon={false}
|
||||
title="Ready to Unlock Your Creativity?"
|
||||
subText="Make your story come alive. Simply build a scene and generate with a style you like. Sign up or log in now to redeem your beta key and start creating today!"
|
||||
/>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
console.log(user);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Container type="panel" className="redeem-container">
|
||||
@@ -154,6 +186,7 @@ export default function RedeemBetaKeyPage() {
|
||||
}}
|
||||
required={true}
|
||||
className="text-center w-100 fs-5"
|
||||
autoFocus={true}
|
||||
/>
|
||||
|
||||
{showAlert && (
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function FakeYouLandingHeader({
|
||||
</div>
|
||||
<div className="col-12 col-lg-6 order-lg-1 d-flex flex-column align-items-center pt-3 pt-lg-0">
|
||||
<Panel clear={true}>
|
||||
<h1 className="fw-bold display-5 text-center text-lg-start px-md-5 px-lg-0">
|
||||
<h1 className="fw-bold display-5 text-center text-lg-start px-md-5 px-lg-0 pe-lg-5">
|
||||
{t("heroTitle")}
|
||||
</h1>
|
||||
<p className="lead opacity-75 pb-4 text-center text-lg-start px-md-5 px-lg-0 pe-lg-5">
|
||||
|
||||
+4
-2
@@ -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 && (
|
||||
<Marquee
|
||||
gradient={showGradient ? true : false}
|
||||
gradientColor="#1a1a27"
|
||||
gradientColor={gradientColor ? gradientColor : "#1a1a27"}
|
||||
//gradientColor={[26, 26, 29]}
|
||||
gradientWidth={small ? 80 : 200}
|
||||
speed={small ? 100 : 50}
|
||||
|
||||
@@ -12,9 +12,9 @@ import { faUser, faKey } from "@fortawesome/free-solid-svg-icons";
|
||||
import { Analytics } from "../../../../common/Analytics";
|
||||
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";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
@@ -92,66 +92,108 @@ function LoginPage(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const betaKeyRedirect = redirectUrl?.includes("/beta-key/redeem");
|
||||
|
||||
return (
|
||||
<Container
|
||||
type="panel"
|
||||
className="login-panel d-flex flex-column align-items-center"
|
||||
>
|
||||
<h2 className="fw-bold mb-0 mt-5 mb-4">Login to {domain.titlePart}</h2>
|
||||
<div className="overflow-hidden auth-page-left">
|
||||
<div className="row h-100 g-0">
|
||||
<div className="col-12 col-lg-6 col-xl-7 bg-panel d-flex flex-column align-items-center justify-content-center order-2 order-lg-1 p-5 p-lg-0">
|
||||
<a href="https://storyteller.ai" style={{ marginBottom: "20px" }}>
|
||||
<img
|
||||
src="/fakeyou/Storyteller-Logo-1.png"
|
||||
alt="Storyteller Logo"
|
||||
style={{ maxWidth: "280px" }}
|
||||
/>
|
||||
</a>
|
||||
<p className="fw-medium fs-5 text-center">
|
||||
Check out what our new AI creation engine can make!
|
||||
</p>
|
||||
|
||||
<Panel padding={true}>
|
||||
{errorWarning}
|
||||
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<div className="d-flex flex-column gap-4">
|
||||
<div>
|
||||
<label className="sub-title">Username or Email</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faUser} />
|
||||
</span>
|
||||
<input
|
||||
className="form-control"
|
||||
type="text"
|
||||
placeholder="Username or Email"
|
||||
value={usernameOrEmail}
|
||||
onChange={handleUsernameOrEmailChange}
|
||||
/>
|
||||
</div>
|
||||
{/*<p className="help"></p>*/}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="sub-title">Password</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className="form-control"
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
value={password}
|
||||
onChange={handlePasswordChange}
|
||||
/>
|
||||
</div>
|
||||
<p className="d-flex flex-lg-row gap-2">
|
||||
<Link
|
||||
to="/password-reset"
|
||||
className="text-link form-text flex-grow-1"
|
||||
>
|
||||
Forgot your password?
|
||||
</Link>
|
||||
<span className="form-text text-link">
|
||||
Don't have an account? <Link to="/signup">Sign up</Link>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="w-100 d-none d-lg-block">
|
||||
<ScrollingSceneCarousel gradientColor="#262636" />
|
||||
</div>
|
||||
<button className="btn btn-primary w-100 mt-4">Login</button>
|
||||
</form>
|
||||
</Panel>
|
||||
</Container>
|
||||
<div className="w-100 d-block d-lg-none">
|
||||
<ScrollingSceneCarousel gradientColor="#262636" small={true} />
|
||||
</div>
|
||||
|
||||
{!betaKeyRedirect && (
|
||||
<p className="fs-7 mt-5">
|
||||
Interested? Join the waitlist at{" "}
|
||||
<a href="https://storyteller.ai" className="text-red">
|
||||
Storyteller.ai
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="col-12 col-lg-6 col-xl-5 d-flex flex-column justify-content-center align-items-center align-items-lg-start order-lg-2 order-1 auth-page-right">
|
||||
<h2 className="fw-bold mb-0 mt-5 mb-4">
|
||||
{betaKeyRedirect
|
||||
? "Login to Redeem Beta Key"
|
||||
: `Login to ${domain.titlePart}`}
|
||||
</h2>
|
||||
|
||||
<Panel padding={true} className="login-panel rounded">
|
||||
{errorWarning}
|
||||
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<div className="d-flex flex-column gap-3">
|
||||
<div>
|
||||
<label className="sub-title">Username or Email</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faUser} />
|
||||
</span>
|
||||
<input
|
||||
className="form-control"
|
||||
type="text"
|
||||
placeholder="Username or Email"
|
||||
value={usernameOrEmail}
|
||||
onChange={handleUsernameOrEmailChange}
|
||||
/>
|
||||
</div>
|
||||
{/*<p className="help"></p>*/}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="sub-title">Password</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className="form-control"
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
value={password}
|
||||
onChange={handlePasswordChange}
|
||||
/>
|
||||
</div>
|
||||
<p className="d-flex flex-lg-row gap-2">
|
||||
<Link
|
||||
to="/password-reset"
|
||||
className="text-link form-text flex-grow-1"
|
||||
>
|
||||
Forgot your password?
|
||||
</Link>
|
||||
<span className="form-text text-link">
|
||||
<div className="d-flex gap-1">
|
||||
<div className="d-block d-xxl-none">No account? </div>
|
||||
<div className="d-none d-xxl-block">
|
||||
Don't have an account?
|
||||
</div>
|
||||
<Link to="/signup">Sign up</Link>
|
||||
</div>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button className="btn btn-primary w-100 mt-4">Login</button>
|
||||
</form>
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 (
|
||||
<Container
|
||||
type="panel"
|
||||
className="login-panel d-flex flex-column align-items-center"
|
||||
>
|
||||
<h2 className="fw-bold mb-0 mt-5 mb-4">Sign Up for {domain.titlePart}</h2>
|
||||
<div className="overflow-hidden auth-page-left">
|
||||
<div className="row h-100 g-0">
|
||||
<div className="col-12 col-lg-6 col-xl-7 bg-panel d-flex flex-column align-items-center justify-content-center order-2 order-lg-1 p-5 p-lg-0">
|
||||
<a href="https://storyteller.ai" style={{ marginBottom: "20px" }}>
|
||||
<img
|
||||
src="/fakeyou/Storyteller-Logo-1.png"
|
||||
alt="Storyteller Logo"
|
||||
style={{ maxWidth: "280px" }}
|
||||
/>
|
||||
</a>
|
||||
<p className="fw-medium fs-5 text-center">
|
||||
Check out what our new AI creation engine can make!
|
||||
</p>
|
||||
|
||||
<Panel padding={true}>
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<div className="d-flex flex-column gap-4">
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.username")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faUser} />
|
||||
</span>
|
||||
<input
|
||||
className={usernameInputClass}
|
||||
type="text"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.usernamePlaceholder"
|
||||
)}
|
||||
value={username}
|
||||
onChange={handleUsernameChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={usernameHelpClass}>{usernameInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.email")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faEnvelope} />
|
||||
</span>
|
||||
<input
|
||||
className={emailInputClass}
|
||||
type="email"
|
||||
placeholder={t("account.SignUpPage.inputs.emailPlaceholder")}
|
||||
value={email}
|
||||
onChange={handleEmailChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={emailHelpClass}>{emailInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.password")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className={passwordInputClass}
|
||||
type="password"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.passwordPlaceholder"
|
||||
)}
|
||||
value={password}
|
||||
onChange={handlePasswordChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={passwordHelpClass}>{passwordInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.passwordConfirm")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className={passwordConfirmationInputClass}
|
||||
type="password"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.passwordConfirmPlaceholder"
|
||||
)}
|
||||
value={passwordConfirmation}
|
||||
onChange={handlePasswordConfirmationChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={passwordConfirmationHelpClass}>
|
||||
{passwordConfirmationInvalidReason}
|
||||
</p>
|
||||
</div>
|
||||
{/*<div className="alert alert-warning mb-0">
|
||||
<strong>Remember your password!</strong> 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.
|
||||
</div>*/}
|
||||
<button className="btn btn-primary btn-lg w-100 mt-2">
|
||||
{t("account.SignUpPage.signUpButton")}
|
||||
</button>
|
||||
<p>
|
||||
<Trans i18nKey="account.SignUpPage.signInInstead">
|
||||
Already have an account?{" "}
|
||||
<Link to="/login">Log in instead.</Link>
|
||||
</Trans>
|
||||
</p>
|
||||
<div className="w-100 d-none d-lg-block">
|
||||
<ScrollingSceneCarousel gradientColor="#262636" />
|
||||
</div>
|
||||
</form>
|
||||
</Panel>
|
||||
</Container>
|
||||
<div className="w-100 d-block d-lg-none">
|
||||
<ScrollingSceneCarousel gradientColor="#262636" small={true} />
|
||||
</div>
|
||||
|
||||
{!betaKeyRedirect && (
|
||||
<p className="fs-7 mt-5">
|
||||
Interested? Join the waitlist at{" "}
|
||||
<a href="https://storyteller.ai" className="text-red">
|
||||
Storyteller.ai
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="col-12 col-lg-6 col-xl-5 d-flex flex-column justify-content-center align-items-center align-items-lg-start order-lg-2 order-1 auth-page-right">
|
||||
<h2 className="fw-bold mb-0 mt-5 mb-4">
|
||||
{betaKeyRedirect
|
||||
? "Sign Up to Redeem Beta Key"
|
||||
: `Sign Up for ${domain.titlePart}`}
|
||||
</h2>
|
||||
|
||||
<Panel padding={true} className="login-panel rounded">
|
||||
<form onSubmit={handleFormSubmit}>
|
||||
<div className="d-flex flex-column gap-2">
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.username")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faUser} />
|
||||
</span>
|
||||
<input
|
||||
className={usernameInputClass}
|
||||
type="text"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.usernamePlaceholder"
|
||||
)}
|
||||
value={username}
|
||||
onChange={handleUsernameChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={usernameHelpClass}>{usernameInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.email")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faEnvelope} />
|
||||
</span>
|
||||
<input
|
||||
className={emailInputClass}
|
||||
type="email"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.emailPlaceholder"
|
||||
)}
|
||||
value={email}
|
||||
onChange={handleEmailChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={emailHelpClass}>{emailInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.password")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className={passwordInputClass}
|
||||
type="password"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.passwordPlaceholder"
|
||||
)}
|
||||
value={password}
|
||||
onChange={handlePasswordChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={passwordHelpClass}>{passwordInvalidReason}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label className="sub-title">
|
||||
{t("account.SignUpPage.inputs.passwordConfirm")}
|
||||
</label>
|
||||
<div className="form-group input-icon">
|
||||
<span className="form-control-feedback">
|
||||
<FontAwesomeIcon icon={faKey} />
|
||||
</span>
|
||||
<input
|
||||
className={passwordConfirmationInputClass}
|
||||
type="password"
|
||||
placeholder={t(
|
||||
"account.SignUpPage.inputs.passwordConfirmPlaceholder"
|
||||
)}
|
||||
value={passwordConfirmation}
|
||||
onChange={handlePasswordConfirmationChange}
|
||||
/>
|
||||
</div>
|
||||
<p className={passwordConfirmationHelpClass}>
|
||||
{passwordConfirmationInvalidReason}
|
||||
</p>
|
||||
</div>
|
||||
{/*<div className="alert alert-warning mb-0">
|
||||
<strong>Remember your password!</strong> 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.
|
||||
</div>*/}
|
||||
<button className="btn btn-primary btn-lg w-100 mt-2">
|
||||
{t("account.SignUpPage.signUpButton")}
|
||||
</button>
|
||||
<p className="fs-7 mt-2">
|
||||
<Trans i18nKey="account.SignUpPage.signInInstead">
|
||||
Already have an account?{" "}
|
||||
<Link to="/login">Log in instead.</Link>
|
||||
</Trans>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user