From 5c17e340d39435796fa8722c037152fd9fe863c0 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Fri, 6 Nov 2026 14:52:49 -0700 Subject: [PATCH] DNS wizard: allow connecting with no records to publish A domain that only needs its DNS host for DNS-01 certificate orders publishes nothing, which the server accepts since inbuxa-server #304. The records step no longer insists on at least one type and says what none means. With nothing to write, the review offers "Connect" and says no records are written, and the last step says the domain is connected instead of counting 0 of 0 records and checking public DNS. --- src/features/dns/ConnectDnsPage.tsx | 124 ++++++++++++++++++---------- src/i18n/en.json | 8 +- 2 files changed, 87 insertions(+), 45 deletions(-) diff --git a/src/features/dns/ConnectDnsPage.tsx b/src/features/dns/ConnectDnsPage.tsx index 62ec8e5..5ef0c06 100644 --- a/src/features/dns/ConnectDnsPage.tsx +++ b/src/features/dns/ConnectDnsPage.tsx @@ -619,7 +619,6 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) { {...common} onBack={() => setStep(choice?.mode === 'new' ? 1 : 0)} onNext={() => setStep(3)} - canNext={kinds.size > 0} aside={

@@ -663,6 +662,14 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) { ))} + {kinds.size === 0 && ( +

+ {t( + 'dnsWizard.noRecordsNote', + 'Nothing is selected, so the server writes no records. That suits a domain that only needs its DNS host for DNS-01 certificate orders.', + )} +

+ )}
@@ -693,7 +700,11 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) { onBack={() => setStep(2)} onNext={finish} busy={busy} - nextLabel={t('dnsWizard.publish', 'Connect and publish')} + nextLabel={ + selectedRecords.length === 0 + ? t('dnsWizard.connectOnlyButton', 'Connect') + : t('dnsWizard.publish', 'Connect and publish') + } aside={ <> @@ -703,11 +714,17 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) { provider: labelOf(choice.variant), }) : t('dnsWizard.happensExisting', 'Your existing connection is used,')}{' '} - {t( - 'dnsWizard.happensRest', - '{{domain}} switches to automatic DNS, and the server starts writing records straight away. Most hosts show them within a minute or two.', - { domain: domain.name }, - )} + {selectedRecords.length === 0 + ? t( + 'dnsWizard.happensNoRecords', + '{{domain}} switches to automatic DNS, and nothing is written. The server uses the connection only for DNS-01 certificate orders.', + { domain: domain.name }, + ) + : t( + 'dnsWizard.happensRest', + '{{domain}} switches to automatic DNS, and the server starts writing records straight away. Most hosts show them within a minute or two.', + { domain: domain.name }, + )}

@@ -735,14 +752,22 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) {
{t('dnsWizard.reviewRecords', 'Records')}
- {selectedRecords.length}{' '} - - {t('dnsWizard.reviewGroups', 'across {{groups}}', { - groups: RECORD_GROUPS.filter((g) => g.kinds.some((k) => kinds.has(k.kind))) - .map((g) => g.title.toLowerCase()) - .join(', '), - })} - + {selectedRecords.length === 0 ? ( + + {t('dnsWizard.reviewNoRecords', 'None. The DNS host is only used for certificate orders.')} + + ) : ( + <> + {selectedRecords.length}{' '} + + {t('dnsWizard.reviewGroups', 'across {{groups}}', { + groups: RECORD_GROUPS.filter((g) => g.kinds.some((k) => kinds.has(k.kind))) + .map((g) => g.title.toLowerCase()) + .join(', '), + })} + + + )}
{origin.trim() && ( <> @@ -756,7 +781,7 @@ export function ConnectDnsPage({ domainId }: { domainId: string }) { {t('dnsWizard.alreadyAuto', 'This domain already publishes automatically; this updates its settings.')}

)} -
+ )} - + {!nothingToPublish && } {records.some((r) => states.get(r) === 'different') && (

diff --git a/src/i18n/en.json b/src/i18n/en.json index 92ec435..e22b174 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1064,7 +1064,13 @@ "failedSaid": "Your DNS host said:", "failedHelp": "Check that the credential can edit this zone, then fix it on the DNS provider’s page. The server retries on its own.", "differentHelp": "An amber mark means that name has a different value right now, often an old record that hasn’t expired from caches yet.", - "tabTitle": "Publish DNS" + "tabTitle": "Publish DNS", + "noRecordsNote": "Nothing is selected, so the server writes no records. That suits a domain that only needs its DNS host for DNS-01 certificate orders.", + "reviewNoRecords": "None. The DNS host is only used for certificate orders.", + "connectedOnly": "{{domain}} is connected.", + "nothingPublished": "No records are written. The server uses your DNS host only to answer DNS-01 challenges when it orders a certificate.", + "connectOnlyButton": "Connect", + "happensNoRecords": "{{domain}} switches to automatic DNS, and nothing is written. The server uses the connection only for DNS-01 certificate orders." }, "dnsCopy": { "copied": "Copied", -- 2.54.0