Merge branch 'dev-1.8.0' into feature-engineering-improvements

This commit is contained in:
Karmaa
2025-10-07 20:05:51 -05:00
committed by GitHub
139 changed files with 3076 additions and 269 deletions

View File

@@ -212,7 +212,18 @@ export function HostManagerEditor({
defaultPath: z.string().optional(),
})
.superRefine((data, ctx) => {
if (data.authType === "key") {
if (data.authType === "password") {
if (
!data.password ||
(typeof data.password === "string" && data.password.trim() === "")
) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: t("hosts.passwordRequired"),
path: ["password"],
});
}
} else if (data.authType === "key") {
if (
!data.key ||
(typeof data.key === "string" && data.key.trim() === "")
@@ -868,21 +879,6 @@ export function HostManagerEditor({
| "credential";
setAuthTab(newAuthType);
form.setValue("authType", newAuthType);
if (newAuthType === "password") {
form.setValue("key", null);
form.setValue("keyPassword", "");
form.setValue("keyType", "auto");
form.setValue("credentialId", null);
} else if (newAuthType === "key") {
form.setValue("password", "");
form.setValue("credentialId", null);
} else if (newAuthType === "credential") {
form.setValue("password", "");
form.setValue("key", null);
form.setValue("keyPassword", "");
form.setValue("keyType", "auto");
}
}}
className="flex-1 flex flex-col h-full min-h-0"
>