reduce spacing in forms

This commit is contained in:
Milo Schwartz 2024-12-22 17:09:22 -05:00
parent f224bfa4ee
commit 11cbafb92a
No known key found for this signature in database
16 changed files with 94 additions and 80 deletions

View file

@ -126,7 +126,7 @@ export default function CreateRoleForm({
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
id="create-role-form"
>
<FormField

View file

@ -173,7 +173,7 @@ export default function DeleteRoleForm({
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
id="remove-role-form"
>
<FormField

View file

@ -123,7 +123,7 @@ export default function AccessControlsPage() {
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}

View file

@ -54,16 +54,14 @@ export default function GeneralPage() {
});
async function deleteOrg() {
await api
.delete(`/org/${org?.org.orgId}`)
.catch((e) => {
await api.delete(`/org/${org?.org.orgId}`).catch((e) => {
toast({
variant: "destructive",
title: "Failed to delete org",
description: formatAxiosError(
e,
"An error occurred while deleting the org."
),
)
});
});
}
@ -109,16 +107,17 @@ export default function GeneralPage() {
</p>
</div>
}
buttonText="Confirm delete organization"
buttonText="Confirm Delete Organization"
onConfirm={deleteOrg}
string={org?.org.name || ""}
title="Delete organization"
title="Delete Organization"
/>
<section className="space-y-8 max-w-lg">
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8 max-w-lg"
className="space-y-4"
>
<FormField
control={form.control}
@ -140,7 +139,7 @@ export default function GeneralPage() {
</form>
</Form>
<Card className="max-w-lg border-red-900 mt-5">
<Card className="border-red-900">
<CardHeader>
<CardTitle className="flex items-center gap-2 text-red-600">
<AlertTriangle className="h-5 w-5" />
@ -148,9 +147,9 @@ export default function GeneralPage() {
</CardTitle>
</CardHeader>
<CardContent>
<p className="text-sm mb-4">
Once you delete this org, there is no going back. Please
be certain.
<p className="text-sm">
Once you delete this org, there is no going back.
Please be certain.
</p>
</CardContent>
<CardFooter className="flex justify-end gap-2">
@ -160,10 +159,11 @@ export default function GeneralPage() {
className="flex items-center gap-2"
>
<Trash2 className="h-4 w-4" />
Delete
Delete Organization Data
</Button>
</CardFooter>
</Card>
</section>
</>
);
}

View file

@ -412,7 +412,7 @@ export default function ResourceAuthenticationPage() {
onSubmit={usersRolesForm.handleSubmit(
onSubmitUsersRoles
)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={usersRolesForm.control}
@ -639,7 +639,7 @@ export default function ResourceAuthenticationPage() {
{whitelistEnabled && (
<Form {...whitelistForm}>
<form className="space-y-8">
<form className="space-y-4">
<FormField
control={whitelistForm.control}
name="emails"

View file

@ -400,7 +400,7 @@ export default function ReverseProxyTargets(props: {
onSubmit={addTargetForm.handleSubmit(
addTarget as any,
)}
className="space-y-8"
className="space-y-4"
>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4">
<FormField

View file

@ -135,7 +135,7 @@ export default function GeneralForm() {
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}

View file

@ -232,7 +232,7 @@ export default function CreateShareLinkForm({
</CredenzaDescription>
</CredenzaHeader>
<CredenzaBody>
<div className="space-y-8">
<div className="space-y-4">
{!link && (
<Form {...form}>
<form

View file

@ -77,7 +77,7 @@ export default function GeneralPage() {
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}

View file

@ -203,7 +203,7 @@ PersistentKeepalive = 5`
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
id="create-site-form"
>
<FormField

View file

@ -211,7 +211,7 @@ export default function ResetPasswordForm({
</CardDescription>
</CardHeader>
<CardContent>
<div className="space-y-8">
<div className="space-y-4">
{state === "request" && (
<Form {...requestForm}>
<form

View file

@ -2,6 +2,7 @@ import { verifySession } from "@app/lib/auth/verifySession";
import { redirect } from "next/navigation";
import { cache } from "react";
import ResetPasswordForm from "./ResetPasswordForm";
import Link from "next/link";
export const dynamic = "force-dynamic";
@ -27,6 +28,19 @@ export default async function Page(props: {
tokenParam={searchParams.token}
emailParam={searchParams.email}
/>
<p className="text-center text-muted-foreground mt-4">
<Link
href={
!searchParams.redirect
? `/auth/signup`
: `/auth/signup?redirect=${searchParams.redirect}`
}
className="underline"
>
Go to login
</Link>
</p>
</>
);
}

View file

@ -114,7 +114,7 @@ export default function SignupForm({ redirect }: SignupFormProps) {
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}

View file

@ -138,7 +138,7 @@ export default function VerifyEmailForm({
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}

View file

@ -188,7 +188,7 @@ export default function StepperForm() {
<Form {...orgForm}>
<form
onSubmit={orgForm.handleSubmit(orgSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={orgForm.control}

View file

@ -134,7 +134,7 @@ export default function LoginForm({ redirect, onLogin }: LoginFormProps) {
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={form.control}
@ -203,7 +203,7 @@ export default function LoginForm({ redirect, onLogin }: LoginFormProps) {
<Form {...mfaForm}>
<form
onSubmit={mfaForm.handleSubmit(onSubmit)}
className="space-y-8"
className="space-y-4"
>
<FormField
control={mfaForm.control}