diff --git a/apps/web/pages/auth/setup.tsx b/apps/web/pages/auth/setup.tsx index 1a22c06006..f5b789ef20 100644 --- a/apps/web/pages/auth/setup.tsx +++ b/apps/web/pages/auth/setup.tsx @@ -1,5 +1,6 @@ import { CheckIcon } from "@heroicons/react/solid"; import { zodResolver } from "@hookform/resolvers/zod"; +import classNames from "classnames"; import { useRouter } from "next/router"; import { useState } from "react"; import { Controller, FormProvider, useForm } from "react-hook-form"; @@ -9,7 +10,7 @@ import { isPasswordValid } from "@calcom/lib/auth"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import prisma from "@calcom/prisma"; import { inferSSRProps } from "@calcom/types/inferSSRProps"; -import { TextField, EmailField, PasswordField } from "@calcom/ui/v2"; +import { TextField, EmailField, PasswordField, Label } from "@calcom/ui/v2"; import WizardForm from "@calcom/ui/v2/core/WizardForm"; const StepDone = () => { @@ -85,6 +86,8 @@ const SetupFormStep1 = (props: { setIsLoading: (val: boolean) => void }) => { } }, onError); + const longWebsiteUrl = process.env.NEXT_PUBLIC_WEBSITE_URL.length > 30; + return (
@@ -93,22 +96,36 @@ const SetupFormStep1 = (props: { setIsLoading: (val: boolean) => void }) => { name="username" control={formMethods.control} render={({ field: { onBlur, onChange, value } }) => ( - - {process.env.NEXT_PUBLIC_WEBSITE_URL}/ - - } - value={value || ""} - className="my-0" - onBlur={onBlur} - name="username" - onChange={async (e) => { - onChange(e.target.value); - formMethods.setValue("username", e.target.value); - await formMethods.trigger("username"); - }} - /> + <> + + + {process.env.NEXT_PUBLIC_WEBSITE_URL}/ + + ) + } + id="username" + labelSrOnly={true} + value={value || ""} + className={classNames("my-0", longWebsiteUrl && "rounded-t-none")} + onBlur={onBlur} + name="username" + onChange={async (e) => { + onChange(e.target.value); + formMethods.setValue("username", e.target.value); + await formMethods.trigger("username"); + }} + /> + )} /> diff --git a/packages/ui/v2/core/form/fields.tsx b/packages/ui/v2/core/form/fields.tsx index 72affbe323..b7c3de356d 100644 --- a/packages/ui/v2/core/form/fields.tsx +++ b/packages/ui/v2/core/form/fields.tsx @@ -268,7 +268,7 @@ export const PasswordField = forwardRef(funct
(funct