Add a static login footer that prompts login, disable input box without auth

This commit is contained in:
sabaimran
2024-12-12 14:57:52 -08:00
parent a7d0ed8670
commit ad3f8a33d1
4 changed files with 49 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
"use client";
import { Button } from "@/components/ui/button";
import { Card, CardDescription, CardHeader } from "@/components/ui/card";
import { KhojLogo } from "../logo/khojLogo";
export interface LoginPopupProps {
isMobileWidth?: boolean;
setShowLoginPrompt: (show: boolean) => void;
}
export default function LoginPopup(props: LoginPopupProps) {
return (
<Card className="absolute inset-x-0 bottom-2 md:bottom-8 left-1/2 transform -translate-x-1/2 p-6 flex flex-col md:flex-row items-center justify-between bg-gradient-to-b from-slate-50 dark:from-slate-900 to-bg-secondary z-30 shadow-lg gap-8 w-full md:w-fit">
{!props.isMobileWidth && <KhojLogo className="w-12 h-auto" />}
<div className="flex flex-col items-start justify-center">
<CardHeader className="p-0 text-xl">Welcome to Khoj!</CardHeader>
<CardDescription>
Get started with Khoj's AI-powered research assistant now.
</CardDescription>
</div>
<Button
variant={"default"}
className="bg-gradient-to-br from-orange-200 to-orange-500"
onClick={() => props.setShowLoginPrompt(true)}
>
Get started for free
</Button>
</Card>
);
}