Skip to content

Commit ed0abb2

Browse files
feat: enhance TLS certificate selection UI in AddDomain component (#4705)
* feat: enhance TLS certificate selection UI in AddDomain component - Added descriptive FormDescriptions for different TLS certificate options (None, Let's Encrypt, Custom) to improve user understanding of certificate provisioning. - Updated placeholder text for the custom certificate resolver input field to provide clearer guidance on expected input format. This update enhances the user experience by providing contextual information directly within the form. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent b4e2d27 commit ed0abb2

1 file changed

Lines changed: 41 additions & 1 deletion

File tree

apps/dokploy/components/dashboard/application/domains/handle-domain.tsx

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,37 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
763763
<SelectItem value={"custom"}>Custom</SelectItem>
764764
</SelectContent>
765765
</Select>
766+
<FormDescription>
767+
{field.value === "none" && (
768+
<>
769+
<strong>None</strong> serves TLS using any
770+
certificate you created in the{" "}
771+
<Link
772+
href="/dashboard/settings/certificates"
773+
className="text-primary"
774+
>
775+
Certificates
776+
</Link>{" "}
777+
section whose CN/SAN matches this host —
778+
Traefik selects it automatically via SNI.
779+
</>
780+
)}
781+
{field.value === "letsencrypt" && (
782+
<>
783+
<strong>Let's Encrypt</strong> auto-provisions
784+
a certificate automatically for this host.
785+
</>
786+
)}
787+
{field.value === "custom" && (
788+
<>
789+
<strong>Custom</strong> uses a Traefik cert
790+
resolver by name (defined in your static
791+
configuration).
792+
</>
793+
)}
794+
{!field.value &&
795+
"Select a certificate provider to see how TLS will be served for this host."}
796+
</FormDescription>
766797
<FormMessage />
767798
</FormItem>
768799
);
@@ -777,10 +808,19 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
777808
return (
778809
<FormItem>
779810
<FormLabel>Custom Certificate Resolver</FormLabel>
811+
<FormDescription>
812+
Enter the <strong>name</strong> of a Traefik
813+
cert resolver defined in your static
814+
configuration (e.g. <code>letsencrypt</code>) —
815+
not certificate or private key content. To use a
816+
certificate you pasted in the Certificates
817+
section, choose <strong>None</strong> instead
818+
and Traefik will match it by SNI.
819+
</FormDescription>
780820
<FormControl>
781821
<Input
782822
className="w-full"
783-
placeholder="Enter your custom certificate resolver"
823+
placeholder="e.g. letsencrypt"
784824
{...field}
785825
value={field.value || ""}
786826
onChange={(e) => {

0 commit comments

Comments
 (0)