Deploy Ladill Link / deploy (push) Successful in 37s
Add Bitly-style branded domain support via Ladill Domains SSL API, account analytics dashboard, settings page with default domain picker, and fix SSO/dashboard issues from QR Plus template leftovers. Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
3.6 KiB
PHP
60 lines
3.6 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">{{ $link->label ?: $link->slug }}</x-slot>
|
|
<div class="mx-auto max-w-3xl space-y-6">
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-semibold text-slate-900">{{ $link->label ?: $link->slug }}</h1>
|
|
<a href="{{ $link->publicUrl() }}" target="_blank" rel="noopener"
|
|
class="mt-1 inline-flex items-center gap-1 text-emerald-600 hover:text-emerald-700">
|
|
{{ $link->publicUrl() }}
|
|
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" /></svg>
|
|
</a>
|
|
</div>
|
|
<form method="POST" action="{{ route('user.links.destroy', $link) }}" onsubmit="return confirm('Delete this link?')">
|
|
@csrf @method('DELETE')
|
|
<button type="submit" class="text-sm text-red-600 hover:text-red-700">Delete</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="grid gap-4 sm:grid-cols-3">
|
|
<div class="rounded-xl border border-slate-200 bg-white p-4">
|
|
<p class="text-sm text-slate-500">Total clicks</p>
|
|
<p class="text-2xl font-semibold">{{ number_format($link->clicks_total) }}</p>
|
|
</div>
|
|
<div class="rounded-xl border border-slate-200 bg-white p-4">
|
|
<p class="text-sm text-slate-500">Unique clicks</p>
|
|
<p class="text-2xl font-semibold">{{ number_format($link->unique_clicks_total) }}</p>
|
|
</div>
|
|
<div class="rounded-xl border border-slate-200 bg-white p-4">
|
|
<p class="text-sm text-slate-500">Last clicked</p>
|
|
<p class="text-sm font-medium">{{ $link->last_clicked_at?->diffForHumans() ?? 'Never' }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<form method="POST" action="{{ route('user.links.update', $link) }}" class="space-y-4 rounded-xl border border-slate-200 bg-white p-6">
|
|
@csrf @method('PATCH')
|
|
|
|
<div>
|
|
<label for="destination_url" class="block text-sm font-medium text-slate-700">Destination URL</label>
|
|
<input type="url" name="destination_url" id="destination_url" value="{{ old('destination_url', $link->destination_url) }}" required
|
|
class="mt-1 block w-full rounded-lg border-slate-300 shadow-sm focus:border-emerald-500 focus:ring-emerald-500">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="label" class="block text-sm font-medium text-slate-700">Label</label>
|
|
<input type="text" name="label" id="label" value="{{ old('label', $link->label) }}"
|
|
class="mt-1 block w-full rounded-lg border-slate-300 shadow-sm focus:border-emerald-500 focus:ring-emerald-500">
|
|
</div>
|
|
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="hidden" name="is_active" value="0">
|
|
<input type="checkbox" name="is_active" value="1" @checked(old('is_active', $link->is_active))
|
|
class="rounded border-slate-300 text-emerald-600 focus:ring-emerald-500">
|
|
Link is active
|
|
</label>
|
|
|
|
<button type="submit" class="rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700">Save changes</button>
|
|
</form>
|
|
</div>
|
|
</x-user-layout>
|