diff --git a/ee/tabby-ui/app/auth/components/signup.tsx b/ee/tabby-ui/app/auth/components/signup.tsx new file mode 100644 index 0000000..0528fd7 --- /dev/null +++ b/ee/tabby-ui/app/auth/components/signup.tsx @@ -0,0 +1,24 @@ +"use client" + +import { UserAuthForm } from "./user-auth-form" +import { useGraphQL } from "@/lib/hooks/use-graphql" +import { getIsAdminInitialized } from "@/lib/gql/request-documents" + +export default function Signup() { + const { data } = useGraphQL(getIsAdminInitialized) + const title = data?.isAdminInitialized ? "Create an account" : "Create an admin account" + + return ( +
+
+

+ {title} +

+

+ Enter your credentials below to create account +

+
+ +
+ ) +} diff --git a/ee/tabby-ui/app/auth/components/user-auth-form.tsx b/ee/tabby-ui/app/auth/components/user-auth-form.tsx index de57837..3dd1b73 100644 --- a/ee/tabby-ui/app/auth/components/user-auth-form.tsx +++ b/ee/tabby-ui/app/auth/components/user-auth-form.tsx @@ -8,9 +8,11 @@ import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" -interface UserAuthFormProps extends React.HTMLAttributes { } +interface UserAuthFormProps extends React.HTMLAttributes { + invitationCode?: string +} -export function UserAuthForm({ className, ...props }: UserAuthFormProps) { +export function UserAuthForm({ className, invitationCode, ...props }: UserAuthFormProps) { const [isLoading, setIsLoading] = React.useState(false) async function onSubmit(event: React.SyntheticEvent) { @@ -26,13 +28,13 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
-
-