From c25174e8d488ae4ec8b7577309247786b9c2e307 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sat, 14 Dec 2024 09:46:19 -0800 Subject: [PATCH] Apply more finished styling to login features, make the pop-up mobile friendly --- .../app/components/loginPrompt/loginPopup.tsx | 27 +++++++++++++--- .../components/loginPrompt/loginPrompt.tsx | 32 +++++++++++-------- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/interface/web/app/components/loginPrompt/loginPopup.tsx b/src/interface/web/app/components/loginPrompt/loginPopup.tsx index 69790d83..3d38178f 100644 --- a/src/interface/web/app/components/loginPrompt/loginPopup.tsx +++ b/src/interface/web/app/components/loginPrompt/loginPopup.tsx @@ -3,6 +3,7 @@ import { Button } from "@/components/ui/button"; import { Card, CardDescription, CardHeader } from "@/components/ui/card"; import { KhojLogo } from "../logo/khojLogo"; +import { Drawer, DrawerContent } from "@/components/ui/drawer"; export interface LoginPopupProps { isMobileWidth?: boolean; @@ -10,18 +11,36 @@ export interface LoginPopupProps { } export default function LoginPopup(props: LoginPopupProps) { + if (props.isMobileWidth) { + return ( + props.setShowLoginPrompt(false)}> + + + + + ); + } + return ( - +
+ +
+ ); +} + +function PopUpContent(props: LoginPopupProps) { + return ( + {!props.isMobileWidth && } -
+
Welcome to Khoj! - Get started with Khoj, your AI-powered knowledge assistant. + Sign in to get started with Khoj, your AI-powered knowledge assistant.
{!checkEmail && ( @@ -255,6 +255,11 @@ function EmailSignInContext({ className="p-6 w-[300px] mx-auto rounded-lg" disabled={checkEmail} value={email} + onKeyDown={(e) => { + if (e.key === "Enter") { + handleMagicLinkSignIn(); + } + }} onChange={(e) => setEmail(e.target.value)} /> @@ -282,7 +287,7 @@ function EmailSignInContext({ Resend email - +