Add basic page to configure the alias

This commit is contained in:
Owen
2026-07-31 17:47:45 -04:00
parent 9e10428640
commit 573747c237
5 changed files with 151 additions and 1 deletions
+10
View File
@@ -485,6 +485,7 @@ function destinationRefine(
const isNativeSsh = data.mode === "ssh" && data.authDaemonMode === "native";
const trimmedDestination = data.destination?.trim();
if (
data.mode !== "inference" &&
!isNativeSsh &&
(!trimmedDestination || trimmedDestination.length < 1)
) {
@@ -555,6 +556,15 @@ export function createHostFormSchema(t: TranslateFn) {
.superRefine((data, ctx) => destinationRefine(data, ctx, t));
}
export function createInferenceFormSchema(t: TranslateFn) {
return z
.object({
mode: z.literal("inference"),
alias: z.string().nullish()
})
.superRefine((data, ctx) => destinationRefine(data, ctx, t));
}
export function createCidrFormSchema(t: TranslateFn) {
return z
.object({