Control with build

This commit is contained in:
Owen
2025-07-14 12:46:47 -07:00
parent 2f20397c60
commit 4b8cc7c4d3

View File

@@ -75,6 +75,7 @@ import {
} from "@app/components/ui/collapsible"; } from "@app/components/ui/collapsible";
import { ContainersSelector } from "@app/components/ContainersSelector"; import { ContainersSelector } from "@app/components/ContainersSelector";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
import { build } from "@server/build";
const addTargetSchema = z.object({ const addTargetSchema = z.object({
ip: z.string().refine(isTargetValid), ip: z.string().refine(isTargetValid),
@@ -772,30 +773,34 @@ export default function ReverseProxyTargets(props: {
className="space-y-4" className="space-y-4"
id="tls-settings-form" id="tls-settings-form"
> >
<FormField {build == "oss" && (
control={tlsSettingsForm.control} <FormField
name="ssl" control={tlsSettingsForm.control}
render={({ field }) => ( name="ssl"
<FormItem> render={({ field }) => (
<FormControl> <FormItem>
<SwitchInput <FormControl>
id="ssl-toggle" <SwitchInput
label={t( id="ssl-toggle"
"proxyEnableSSL" label={t(
)} "proxyEnableSSL"
defaultChecked={ )}
field.value defaultChecked={
} field.value
onCheckedChange={( }
val onCheckedChange={(
) => { val
field.onChange(val); ) => {
}} field.onChange(
/> val
</FormControl> );
</FormItem> }}
)} />
/> </FormControl>
</FormItem>
)}
/>
)}
<FormField <FormField
control={tlsSettingsForm.control} control={tlsSettingsForm.control}
name="tlsServerName" name="tlsServerName"