From 23b0935fb1d5741b958e4e2a7865d744675a66ed Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Tue, 5 Dec 2023 14:34:02 +0800 Subject: [PATCH] feat: add auth page for signup --- .../app/auth/components/user-auth-form.tsx | 63 +++++++++++++++++++ ee/tabby-ui/app/auth/page.tsx | 30 +++++++++ 2 files changed, 93 insertions(+) create mode 100644 ee/tabby-ui/app/auth/components/user-auth-form.tsx create mode 100644 ee/tabby-ui/app/auth/page.tsx diff --git a/ee/tabby-ui/app/auth/components/user-auth-form.tsx b/ee/tabby-ui/app/auth/components/user-auth-form.tsx new file mode 100644 index 0000000..de57837 --- /dev/null +++ b/ee/tabby-ui/app/auth/components/user-auth-form.tsx @@ -0,0 +1,63 @@ +"use client" + +import * as React from "react" + +import { cn } from "@/lib/utils" +import { IconSpinner } from "@/components/ui/icons" +import { Button } from "@/components/ui/button" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" + +interface UserAuthFormProps extends React.HTMLAttributes { } + +export function UserAuthForm({ className, ...props }: UserAuthFormProps) { + const [isLoading, setIsLoading] = React.useState(false) + + async function onSubmit(event: React.SyntheticEvent) { + event.preventDefault() + setIsLoading(true) + + setTimeout(() => { + setIsLoading(false) + }, 3000) + } + + return ( +
+
+
+
+ + +
+
+ + +
+ +
+
+
+ ) +} \ No newline at end of file diff --git a/ee/tabby-ui/app/auth/page.tsx b/ee/tabby-ui/app/auth/page.tsx new file mode 100644 index 0000000..5943578 --- /dev/null +++ b/ee/tabby-ui/app/auth/page.tsx @@ -0,0 +1,30 @@ +import { Metadata } from "next" +import Image from "next/image" +import Link from "next/link" + +import { cn } from "@/lib/utils" +import { buttonVariants } from "@/components/ui/button" +import { UserAuthForm } from "./components/user-auth-form" + +export const metadata: Metadata = { + title: "Authentication", + description: "Authentication forms built using the components.", +} + +export default function AuthenticationPage() { + return ( +
+
+
+

+ Create an account +

+

+ Enter your credentials below to create admin account +

+
+ +
+
+ ) +} \ No newline at end of file