fix email and allow localhost in ip field

This commit is contained in:
Milo Schwartz 2025-01-04 22:38:10 -05:00
parent e0875b361d
commit bb16fd1db8
No known key found for this signature in database
3 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,5 @@
import React from "react";
export default function ButtonLink({ export default function ButtonLink({
href, href,
children, children,

View file

@ -65,7 +65,7 @@ import {
import { SwitchInput } from "@app/components/SwitchInput"; import { SwitchInput } from "@app/components/SwitchInput";
const addTargetSchema = z.object({ const addTargetSchema = z.object({
ip: z.string().ip(), ip: z.union([z.string().ip(), z.literal("localhost")]),
method: z.string(), method: z.string(),
port: z.coerce.number().int().positive() port: z.coerce.number().int().positive()
// protocol: z.string(), // protocol: z.string(),

View file

@ -149,6 +149,7 @@ export default function GeneralForm() {
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}
className="space-y-4" className="space-y-4"
id="general-settings-form"
> >
<FormField <FormField
control={form.control} control={form.control}