@php // Client-side open seed — deferred $set (arg 3 = false) never fires /livewire/update. $blank = ['host' => '', 'showModal' => true]; @endphp {{-- The PLAN sets the quota. Full (or zero) and the button disappears and says why — save() re-validates it the same way on the server. --}} @if ($canAddDomain) @if ($maxCustomDomains > 0) {{ __(':used of :max used', ['used' => $usedCustomDomains, 'max' => $maxCustomDomains]) }} @endif @elseif ($maxCustomDomains > 0) {{ trans_choice( '{1}One custom domain included in your plan — remove the current one to use a different domain.' .'|[2,*]All :count custom domains in your plan are in use — remove one to add a different domain.', $maxCustomDomains, ['count' => $maxCustomDomains], ) }} @endif {{-- ── Plan doesn't include a custom domain ────────────────────────────── It's not a 403 or an empty screen: the reseller still sees the subdomain they ARE served on, alongside what upgrading a tier adds. Same pattern as /panel/providers. --}} @if ($maxCustomDomains === 0)

{{ __('Your own domain is not part of your current plan') }}

{{ __('Your storefront is live right now on the subdomain below — clients can buy from it today. A higher tier lets you serve the same panel on a domain you own.') }}

@foreach ([ ['globe', __('Your brand in the address bar'), __('shop.yourbrand.com instead of a shared subdomain.')], ['shield-check', __('Verified by DNS'), __('A TXT record proves the domain is yours before it goes live.')], ['search', __('Your own SEO'), __('Your storefront ranks under your domain, not ours.')], ['mail', __('Consistent everywhere'), __('Links, invoices and emails all point at your brand.')], ] as [$icon, $title, $text])
{{ $title }}
{{ $text }}
@endforeach
@if ($upgradePlans->isNotEmpty() && $canSelfServe) @foreach ($upgradePlans as $upgradePlan)

{{ $upgradePlan->name }}

{{ money($upgradePlan->price, $upgradePlan->currency) }}/{{ __(ucfirst($upgradePlan->billing_period)) }}
{{ __('Upgrade') }}
@endforeach

{{ __('Nothing is deleted when you upgrade: your clients, branding and order history all stay exactly as they are.') }}

@else

{{ __('Ask your platform owner') }}

{{ __('There is no self-serve tier with a custom domain right now. Contact your platform owner to have it enabled on your account.') }}

@endif
@endif
@forelse ($domains as $domain) @php $isPlatform = \App\Support\PlatformSubdomain::isPlatformHost($domain->host); @endphp
{{ $domain->host }} @if ($isPlatform) {{ __('Platform address') }} @endif @if ($domain->is_primary) {{ __('Primary') }} @endif @if ($domain->isVerified()) {{ __('Verified') }} @else {{ __('Pending verification') }} @endif @php $sslTone = ['active' => 'success', 'pending' => 'warning', 'failed' => 'danger'][$domain->ssl_status] ?? 'neutral'; @endphp {{ __('SSL: :status', ['status' => __(ucfirst($domain->ssl_status))]) }}
@if ($isPlatform) {{-- The platform address already resolves: the install's wildcard serves it. Showing DNS steps for a custom domain here would be asking them to prove something the platform already knows. --}}

{{ __('Nothing to set up') }}

{{ __('This address is served by the platform and is live already. You can change the name, but it cannot be removed — it is the address your store always falls back to.') }}

{{-- The optional 301 to their own domain. Only shows up when there's a real target: own domain, primary, and verified. Without that there's no switch to turn on. --}} @if ($redirectTarget)
{{ __('Send this address to :host', ['host' => $redirectTarget]) }}

{{ __('Visitors who open your platform address land on your own domain instead, on the same page they asked for. Your panel, the API and machine calls are never redirected. Anyone signed in on the old address simply signs in once on the new one.') }}

@endif
@else {{-- Where the domain points. Without this the reseller had the verification record but no destination: they knew how to prove the domain was theirs but not how to route it here. --}}

{{ __('Step 1 — point the domain here') }}

{{-- Terminology copied straight from Cloudflare (Name/Target, Name/Content): the reseller compares it field by field against their provider. "Host/Value" doesn't exist on those screens and already caused a misconfigured record. --}}
@if ($dnsTarget['cname']) {{ __('Type') }}CNAME {{ __('Name') }} {{ $domain->host }} {{ __('Target') }} {{ $dnsTarget['cname'] }} @endif @if ($dnsTarget['ip']) {{ __('Type') }}A {{ __('Name') }} {{ $domain->host }} {{ __('IPv4 address') }} {{ $dnsTarget['ip'] }} @endif @if (! $dnsTarget['cname'] && ! $dnsTarget['ip']) {{ __('Ask your provider for the address to point this domain at.') }} @endif
{{-- DNS instructions --}}

{{ __('Step 2 — prove it is yours (TXT record)') }}

@php // The FULL name of the TXT record DnsVerifier queries for // THIS domain. Showing only the "_redfamosa" prefix led a // real user to hang it off the root of their zone, and // verification never passed. The DNS provider trims the // zone part on its own only when it's redundant (Cloudflare does this). $txtName = $txtHost.'.'.$domain->host; @endphp
{{ __('Type') }}TXT {{ __('Name') }} {{ $txtName }} {{ __('Content') }} {{ $domain->dns_verification_token }}
@unless ($domain->isVerified())

{{ __('Add this TXT record at your DNS provider, then click Verify. Propagation can take a few minutes.') }}

@endunless
{{-- SSL note (buyer-managed) --}}
{{ __('SSL is issued by your hosting: enable cPanel AutoSSL or put the domain behind Cloudflare (Full mode) after the A record points here. :name does not issue certificates.', ['name' => \App\Support\Brand::name()]) }}
@endif
{{-- Actions --}}
@unless ($isPlatform || $domain->isVerified()) @endunless @unless ($domain->is_primary) @endunless @if ($isPlatform) {{-- Rename, never delete: releasing the host doesn't turn it off, the owner's panel picks it up via the wildcard. --}} @else @endif
@empty

{{ __('No domains yet') }}

@if ($canAddDomain)

{{ __('Add your first domain to run the panel under your own brand.') }}

@else

{{ __('Your panel is served on its platform subdomain. Upgrade your plan to add a domain of your own.') }}

@endif
@endforelse
{{-- Add domain modal — only rendered when the plan actually allows one. --}} @if ($canAddDomain)
@error('host')

{{ $message }}

@enderror

{{ __('No http:// and no trailing path — just the hostname.') }}

@endif {{-- ── Change the platform address ───────────────────────────────────── Rename, not delete. The warning states the REAL effect before confirming — the store moves right away and old links stop working — because the previous copy talked in the past tense about something that hadn't happened yet. --}} @if ($platformHost)
.{{ $baseHost }}
@error('newSubdomain')

{{ $message }}

@enderror {{-- Live availability check. The server re-validates it on save: between this response and the click, another reseller could grab the same name. --}} @if ($renameStatus === 'free')

{{ __(':host is available.', ['host' => $newSubdomain.'.'.$baseHost]) }}

@elseif ($renameStatus === 'taken')

{{ __('That address is already taken.') }}

@elseif ($renameStatus === 'invalid')

{{ __('Use lowercase letters, numbers and hyphens — no dots and no spaces.') }}

@elseif ($renameStatus === 'current')

{{ __('This is your address right now.') }}

@endif
{{ $renameStatus === 'free' ? __('Your store moves to :host immediately. Links to the old address stop working.', ['host' => $newSubdomain.'.'.$baseHost]) : __('Your store moves to the new address immediately. Links to the old address stop working.') }}
@endif