code formatting

This commit is contained in:
daniel31x13 2023-12-07 06:35:08 -05:00
parent 5b44bbcf59
commit 93e4897c0b

View File

@ -78,54 +78,61 @@ export default function Login() {
<form onSubmit={loginUser}> <form onSubmit={loginUser}>
<div className="p-4 mx-auto flex flex-col gap-3 justify-between max-w-[30rem] min-w-80 w-full bg-base-200 rounded-2xl shadow-md border border-neutral-content"> <div className="p-4 mx-auto flex flex-col gap-3 justify-between max-w-[30rem] min-w-80 w-full bg-base-200 rounded-2xl shadow-md border border-neutral-content">
{process.env.NEXT_PUBLIC_DISABLE_LOGIN !== "true" ? ( {process.env.NEXT_PUBLIC_DISABLE_LOGIN !== "true" ? (
<div> <div>
<p className="text-3xl text-center font-extralight"> <p className="text-3xl text-center font-extralight">
Enter your credentials Enter your credentials
</p> </p>
<div className="divider my-0"></div> <div className="divider my-0"></div>
<div> <div>
<p className="text-sm w-fit font-semibold mb-1"> <p className="text-sm w-fit font-semibold mb-1">
Username Username
{emailEnabled ? " or Email" : undefined} {emailEnabled ? " or Email" : undefined}
</p> </p>
<TextInput <TextInput
autoFocus={true} autoFocus={true}
placeholder="johnny" placeholder="johnny"
value={form.username} value={form.username}
className="bg-base-100" className="bg-base-100"
onChange={(e) => setForm({ ...form, username: e.target.value })} onChange={(e) =>
/> setForm({ ...form, username: e.target.value })
</div> }
/>
<div className="w-full">
<p className="text-sm w-fit font-semibold mb-1">Password</p>
<TextInput
type="password"
placeholder="••••••••••••••"
value={form.password}
className="bg-base-100"
onChange={(e) => setForm({ ...form, password: e.target.value })}
/>
{emailEnabled && (
<div className="w-fit ml-auto mt-1">
<Link href={"/forgot"} className="text-neutral font-semibold">
Forgot Password?
</Link>
</div> </div>
)}
</div>
<SubmitButton <div className="w-full">
type="submit" <p className="text-sm w-fit font-semibold mb-1">Password</p>
label="Login"
className=" w-full text-center" <TextInput
loading={submitLoader} type="password"
/> placeholder="••••••••••••••"
</div> value={form.password}
className="bg-base-100"
onChange={(e) =>
setForm({ ...form, password: e.target.value })
}
/>
{emailEnabled && (
<div className="w-fit ml-auto mt-1">
<Link
href={"/forgot"}
className="text-neutral font-semibold"
>
Forgot Password?
</Link>
</div>
)}
</div>
<SubmitButton
type="submit"
label="Login"
className=" w-full text-center"
loading={submitLoader}
/>
</div>
) : undefined} ) : undefined}
{process.env.NEXT_PUBLIC_KEYCLOAK_ENABLED === "true" ? ( {process.env.NEXT_PUBLIC_KEYCLOAK_ENABLED === "true" ? (
<SubmitButton <SubmitButton