Fix some ui form issues

This commit is contained in:
Owen
2026-05-31 11:57:01 -07:00
parent 3cf6abdf27
commit c1d933259a
9 changed files with 49 additions and 51 deletions

View File

@@ -478,14 +478,12 @@ export function PrivateResourceForm({
const [sshServerMode, setSshServerMode] = useState<"standard" | "native">(
() => {
if (
variant === "edit" &&
resource &&
resource.authDaemonMode === "native"
) {
return "native";
if (variant === "edit" && resource) {
return resource.authDaemonMode === "native"
? "native"
: "standard";
}
return "standard";
return "native";
}
);
@@ -559,7 +557,7 @@ export function PrivateResourceForm({
tcpPortRangeString: "*",
udpPortRangeString: "*",
disableIcmp: false,
authDaemonMode: "site",
authDaemonMode: "native",
authDaemonPort: null,
pamMode: "passthrough",
roles: [],
@@ -624,7 +622,7 @@ export function PrivateResourceForm({
tcpPortRangeString: "*",
udpPortRangeString: "*",
disableIcmp: false,
authDaemonMode: "site",
authDaemonMode: "native",
authDaemonPort: null,
pamMode: "passthrough",
roles: [],