From d3be1fbf4c1270dd9fd710ecd5d7e7921f062004 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Fri, 5 Dec 2025 12:09:02 -0500 Subject: [PATCH] update descriptions and add adress back --- messages/en-US.json | 7 +- .../settings/clients/machine/create/page.tsx | 174 ++++++------------ .../[orgId]/settings/sites/create/page.tsx | 122 ++++++------ 3 files changed, 126 insertions(+), 177 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 87d65076..8888bd6a 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1645,8 +1645,9 @@ "siteConfiguration": "Configuration", "siteAcceptClientConnections": "Accept Client Connections", "siteAcceptClientConnectionsDescription": "Allow user devices and clients to access resources on this site. This can be changed later.", - "siteAddress": "Site Address", + "siteAddress": "Site Address (Advanced)", "siteAddressDescription": "The internal address of the site. Must fall within the organization's subnet.", + "siteNameDescription": "The display name of the site that can be changed later.", "autoLoginExternalIdp": "Auto Login with External IDP", "autoLoginExternalIdpDescription": "Immediately redirect the user to the external IDP for authentication.", "selectIdp": "Select IDP", @@ -2239,5 +2240,7 @@ "noData": "No Data", "machineClients": "Machine Clients", "install": "Install", - "run": "Run" + "run": "Run", + "clientNameDescription": "The display name of the client that can be changed later.", + "clientAddress": "Client Address (Advanced)" } diff --git a/src/app/[orgId]/settings/clients/machine/create/page.tsx b/src/app/[orgId]/settings/clients/machine/create/page.tsx index 4bb2d24c..a0489f30 100644 --- a/src/app/[orgId]/settings/clients/machine/create/page.tsx +++ b/src/app/[orgId]/settings/clients/machine/create/page.tsx @@ -410,120 +410,68 @@ export default function Page() { - -
- { - if (e.key === "Enter") { - e.preventDefault(); // block default enter refresh - } - }} - className="space-y-4" - id="create-client-form" - > - ( - - - {t("name")} - - - - - - - )} - /> + + { + if (e.key === "Enter") { + e.preventDefault(); // block default enter refresh + } + }} + className="space-y-4 grid gap-4 grid-cols-1 md:grid-cols-2 items-start" + id="create-client-form" + > + ( + + + {t("name")} + + + + + + + {t( + "clientNameDescription" + )} + + + )} + /> - {/* ( */} - {/* */} - {/* */} - {/* {t("address")} */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* {t( */} - {/* "addressDescription" */} - {/* )} */} - {/* */} - {/* */} - {/* )} */} - {/* /> */} - - {/* ( */} - {/* */} - {/* */} - {/* {t("sites")} */} - {/* */} - {/* { */} - {/* form.setValue( */} - {/* "siteIds", */} - {/* olmags as [ */} - {/* Tag, */} - {/* ...Tag[] */} - {/* ] */} - {/* ); */} - {/* }} */} - {/* enableAutocomplete={ */} - {/* true */} - {/* } */} - {/* autocompleteOptions={ */} - {/* sites */} - {/* } */} - {/* allowDuplicates={ */} - {/* false */} - {/* } */} - {/* restrictTagsToAutocompleteOptions={ */} - {/* true */} - {/* } */} - {/* sortTags={true} */} - {/* /> */} - {/* */} - {/* {t("sitesDescription")} */} - {/* */} - {/* */} - {/* */} - {/* )} */} - {/* /> */} - - -
+ ( + + + {t("clientAddress")} + + + + + + + {t( + "addressDescription" + )} + + + )} + /> + +
diff --git a/src/app/[orgId]/settings/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx index c107ef57..a1362e87 100644 --- a/src/app/[orgId]/settings/sites/create/page.tsx +++ b/src/app/[orgId]/settings/sites/create/page.tsx @@ -693,87 +693,85 @@ WantedBy=default.target` - -
- { - if (e.key === "Enter") { - e.preventDefault(); // block default enter refresh - } - }} - className="space-y-4" - id="create-site-form" - > + + { + if (e.key === "Enter") { + e.preventDefault(); // block default enter refresh + } + }} + className="space-y-4 grid gap-4 grid-cols-1 md:grid-cols-2 items-start" + id="create-site-form" + > + ( + + + {t("name")} + + + + + + + {t( + "siteNameDescription" + )} + + + )} + /> + {form.watch("method") === "newt" && ( ( - {t("name")} + {t("siteAddress")} { + setClientAddress( + e.target + .value + ); + field.onChange( + e.target + .value + ); + }} /> + + {t( + "siteAddressDescription" + )} + )} /> - {/*form.watch("method") === - "newt" && ( - ( - - - {t( - "siteAddress" - )} - - - { - setClientAddress( - e - .target - .value - ); - field.onChange( - e - .target - .value - ); - }} - /> - - - - {t( - "siteAddressDescription" - )} - - - )} - /> - )*/} - - -
+ )} + + {tunnelTypes.length > 1 && ( <>
- {t("type")} + {t("type")}