Deploy Ladill Link / deploy (push) Successful in 42s
Use indigo pill CTAs and sidebar accents to match Merchant, Give, and other Ladill apps. Co-authored-by: Cursor <cursoragent@cursor.com>
93 lines
6.0 KiB
PHP
93 lines
6.0 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Custom Domains</x-slot>
|
|
<div class="mx-auto max-w-4xl space-y-6">
|
|
<div>
|
|
<h1 class="text-2xl font-semibold text-slate-900">Custom Domains</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Use your own domain for short links — like Bitly branded domains. Point DNS to Ladill, we handle SSL.</p>
|
|
</div>
|
|
|
|
@unless($enabled)
|
|
<div class="rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900">
|
|
Custom domains are not configured on this environment yet. Contact support to enable the Domains API key.
|
|
</div>
|
|
@endunless
|
|
|
|
@if($enabled)
|
|
<div class="rounded-xl border border-slate-200 bg-white p-6">
|
|
<h2 class="font-semibold text-slate-900">Connect a domain</h2>
|
|
<p class="mt-1 text-sm text-slate-500">Example: <span class="font-medium">go.yourbrand.com</span> → short links like <span class="font-medium">go.yourbrand.com/summer-sale</span></p>
|
|
<form method="POST" action="{{ route('link.domains.store') }}" class="mt-5 space-y-4">
|
|
@csrf
|
|
<div>
|
|
<label class="block text-sm font-medium text-slate-700">Domain</label>
|
|
<input type="text" name="host" value="{{ old('host') }}" placeholder="go.yourbrand.com"
|
|
class="mt-1 w-full rounded-lg border-slate-200 text-sm" required>
|
|
@error('host')<p class="mt-1 text-xs text-red-600">{{ $message }}</p>@enderror
|
|
</div>
|
|
<label class="flex items-center gap-2 text-sm text-slate-600">
|
|
<input type="checkbox" name="include_www" value="1" checked class="rounded border-slate-300 text-emerald-600">
|
|
Include www subdomain in certificate
|
|
</label>
|
|
<label class="flex items-center gap-2 text-sm text-slate-600">
|
|
<input type="checkbox" name="make_default" value="1" class="rounded border-slate-300 text-emerald-600">
|
|
Make default domain for new links
|
|
</label>
|
|
<p class="text-xs text-slate-500">Add an <strong>A record</strong> for your domain pointing to <code class="rounded bg-slate-100 px-1">{{ $serverIp }}</code>, then click Verify.</p>
|
|
<button type="submit" class="btn-primary">Add domain</button>
|
|
</form>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="rounded-xl border border-slate-200 bg-white">
|
|
<div class="border-b border-slate-100 px-5 py-4">
|
|
<h2 class="font-semibold text-slate-900">Your domains</h2>
|
|
</div>
|
|
@if($domains->isEmpty())
|
|
<p class="px-5 py-8 text-center text-sm text-slate-400">No custom domains yet. Your links use <span class="font-medium text-emerald-700">{{ $publicDomain }}</span> by default.</p>
|
|
@else
|
|
<ul class="divide-y divide-slate-100">
|
|
@foreach($domains as $domain)
|
|
<li class="px-5 py-4">
|
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<p class="font-medium text-slate-900">{{ $domain->host }}</p>
|
|
<p class="mt-1 text-xs text-slate-500">
|
|
DNS: {{ $domain->dns_verified_at ? 'verified' : 'pending' }} ·
|
|
SSL: {{ $domain->ssl_status }} ·
|
|
@if($domain->is_default)<span class="font-medium text-emerald-700">Default</span>@endif
|
|
</p>
|
|
@if($domain->last_error)
|
|
<p class="mt-1 text-xs text-red-600">{{ $domain->last_error }}</p>
|
|
@endif
|
|
</div>
|
|
<div class="flex flex-wrap gap-2">
|
|
@if($enabled && $domain->ssl_status !== 'active')
|
|
<form method="POST" action="{{ route('link.domains.verify', $domain) }}">
|
|
@csrf
|
|
<button class="rounded-lg border border-slate-200 px-3 py-1.5 text-xs font-medium text-slate-700 hover:bg-slate-50">Verify DNS</button>
|
|
</form>
|
|
@endif
|
|
@if($domain->isLive() && ! $domain->is_default)
|
|
<form method="POST" action="{{ route('link.domains.default', $domain) }}">
|
|
@csrf
|
|
<button class="rounded-lg border border-emerald-200 px-3 py-1.5 text-xs font-medium text-emerald-700 hover:bg-emerald-50">Make default</button>
|
|
</form>
|
|
@endif
|
|
<form method="POST" action="{{ route('link.domains.destroy', $domain) }}" onsubmit="return confirm('Remove this domain?')">
|
|
@csrf @method('DELETE')
|
|
<button class="rounded-lg border border-red-200 px-3 py-1.5 text-xs font-medium text-red-700 hover:bg-red-50">Remove</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</div>
|
|
|
|
<p class="text-sm text-slate-500">
|
|
Domains also appear in <a href="{{ ladill_domains_url() }}" class="font-medium text-emerald-700 hover:underline">Ladill Domains</a> once connected.
|
|
</p>
|
|
</div>
|
|
</x-user-layout>
|