diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index fe961b7..f64f9e1 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -1,29 +1,30 @@ "use client"; -import { - ArrowRight, - MessageSquare, - Wrench, - Shield, - LogIn, - UserPlus, - LogOut, -} from "lucide-react"; +import { useState } from "react"; +import { ArrowRight, MessageSquare, Wrench, Shield, LogOut } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import Link from "next/link"; import Image from "next/image"; import { useUser } from "@auth0/nextjs-auth0/client"; +import { LoginRequiredDialog } from "@/components/login-required-dialog"; -const loginHref = "/auth/login?returnTo=/chat"; -const signupHref = "/auth/login?returnTo=/chat&screen_hint=signup"; const exploreHref = "/search"; +const HOME_LOGIN_DESCRIPTION = + "Log in or register to chat with the AI assistant or run an AI analysis. Registration is free and no private information is asked. You’ll get access to both AI tools and VCell modeling and simulation platform using the same credentials."; + export default function LandingPage() { const { user } = useUser(); + const [showLoginDialog, setShowLoginDialog] = useState(false); return (
+ {/* Header with Navigation */}
@@ -165,26 +166,9 @@ export default function LandingPage() { authentication.

{!user && ( -
- - -
+ )} diff --git a/frontend/components/login-required-dialog.tsx b/frontend/components/login-required-dialog.tsx index c7a82b8..3d59b59 100644 --- a/frontend/components/login-required-dialog.tsx +++ b/frontend/components/login-required-dialog.tsx @@ -13,14 +13,19 @@ import { DialogFooter, } from "@/components/ui/dialog"; +const DEFAULT_DESCRIPTION = + "Log in or register to chat with the AI assistant or run an AI analysis. You'll be brought right back here. Registration is free and no private information is asked. You’ll get access to both AI tools and VCell modeling and simulation platform using the same credentials."; + interface LoginRequiredDialogProps { open: boolean; onOpenChange: (open: boolean) => void; + description?: string; } export function LoginRequiredDialog({ open, onOpenChange, + description = DEFAULT_DESCRIPTION, }: LoginRequiredDialogProps) { const pathname = usePathname(); const searchParams = useSearchParams(); @@ -34,10 +39,7 @@ export function LoginRequiredDialog({ Log in to continue - - Log in to chat with the AI assistant or run an AI analysis. - You'll be brought right back here. - + {description}