From d5681ad1a27b853436471c759f8d0de813756870 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 13 Dec 2024 11:30:14 -0800 Subject: [PATCH] Update image assets to sign up prompt --- .../chatInputArea/chatInputArea.tsx | 1 + .../app/components/loginPrompt/loginPopup.tsx | 8 +- .../loginPrompt/loginPrompt.module.css | 1 - .../components/loginPrompt/loginPrompt.tsx | 119 +++++++++++------- 4 files changed, 80 insertions(+), 49 deletions(-) diff --git a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx index 173f6edc..cb55386a 100644 --- a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx +++ b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx @@ -732,6 +732,7 @@ export const ChatInputArea = forwardRef((pr
-
Sign in with Email
+
Get started with Khoj
{checkEmail ? recheckEmail - ? "A new link has been sent. Click on the link in your email to sign-in" - : "Click on the link in your email to sign-in" + ? `A new link has been sent to ${email}. Click on the link in your email to sign-in` + : `A sign-in link has been sent to ${email}. Click on the link in your email to sign-in` : "You will receive a sign-in link on the email address you provide below"}
- setEmail(e.target.value)} - /> - + {!checkEmail && ( + <> + setEmail(e.target.value)} + /> + + + )} + {checkEmail && ( -
+
- +
@@ -311,12 +316,25 @@ function MainSignInContext({ setUseEmailSignIn: (useEmailSignIn: boolean) => void; isMobileWidth: boolean; }) { - const plugin = useRef(Autoplay({ delay: 2000, stopOnInteraction: true })); + const plugin = useRef(Autoplay({ delay: 3500, stopOnInteraction: true })); + const [showArrows, setShowArrows] = useState(false); const tips = [ - { src: "/documents_tip.png", alt: "Documents tip" }, - { src: "/personalize_tip.png", alt: "Personalize tip" }, - { src: "/automate_tip.png", alt: "Automate tip" }, + { + src: "https://assets.khoj.dev/sign_in_demos/research_mode.gif", + alt: "Research tip", + description: "Use research mode to find answers to your questions", + }, + { + src: "https://assets.khoj.dev/sign_in_demos/custom_agents.gif", + alt: "Personalize tip", + description: "Personalize your Khoj experience by creating custom agents", + }, + { + src: "https://assets.khoj.dev/sign_in_demos/docment_questions.gif", + alt: "Document tip", + description: "Understand and create documents to expand your knowledge base", + }, ]; return ( @@ -325,15 +343,24 @@ function MainSignInContext({ { + plugin.current.stop(); + setShowArrows(true); + }} + onMouseLeave={() => { + plugin.current.play(); + setShowArrows(false); + }} > {tips.map((tip, index) => ( -
+
- + +
+ {tip.description} +
{tip.alt} ))} - - + {showArrows && ( + <> + + + + )} )} -
-
- Sign in to unlock your second brain +
+
+ Sign in for free to unlock your second brain
-
+
{/*
*/}
-
+
By logging in, you agree to our{" "} Terms of Service. See{" "} Privacy Policy.