/* * SPDX-FileCopyrightText: 2026 Coffey Labs * * SPDX-License-Identifier: AGPL-3.0-only */ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { CheckCircle2, Wand2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { LaunchChoice } from '@/components/wizard/LaunchChoice'; import { useSchemaStore } from '@/stores/schemaStore'; /** * At the top of a domain's DNS section: an invitation to have the server * publish the records itself. It asks "guided or manual?" every time; manual * closes the question and leaves you at the DNS Management field just below. */ export function DnsConnectCard({ domainId, automatic }: { domainId: string; automatic: boolean }) { const { t } = useTranslation(); const navigate = useNavigate(); const section = useSchemaStore((s) => s.viewToSection['x:Domain']) ?? 'Management'; const [open, setOpen] = useState(false); return (
{automatic ? t('dnsCard.autoTitle', 'The server keeps this domain’s DNS up to date') : t('dnsCard.title', 'Let the server publish your DNS records')}
{automatic ? t('dnsCard.autoHint', 'See which records are live, or change what it publishes.') : t( 'dnsCard.hint', 'Connect your DNS host, such as Cloudflare, and skip copying records by hand. Optional.', )}