Files
ladill-link/resources/views/links/index.blade.php
T
isaaccladandCursor 9516fcb9f3
Deploy Ladill Link / deploy (push) Successful in 37s
Expand Link app with analytics, settings, and custom domains.
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>
2026-06-27 12:16:34 +00:00

57 lines
3.2 KiB
PHP

<x-user-layout>
<x-slot name="title">My Links</x-slot>
<div class="mx-auto max-w-5xl space-y-6">
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div>
<h1 class="text-2xl font-semibold text-slate-900">My Links</h1>
<p class="mt-1 text-sm text-slate-500">GHS {{ number_format($pricePerLink, 2) }} debited from your wallet per link</p>
</div>
<a href="{{ route('user.links.create') }}"
class="inline-flex items-center justify-center rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700">
Create link
</a>
</div>
<div class="overflow-hidden rounded-xl border border-slate-200 bg-white">
@if($links->isEmpty())
<div class="px-6 py-12 text-center">
<p class="text-slate-500">No links yet. Create your first short link on ladl.link.</p>
</div>
@else
<table class="min-w-full divide-y divide-slate-100">
<thead class="bg-slate-50 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">
<tr>
<th class="px-5 py-3">Link</th>
<th class="px-5 py-3">Destination</th>
<th class="px-5 py-3">Clicks</th>
<th class="px-5 py-3">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-sm">
@foreach($links as $link)
<tr class="hover:bg-slate-50">
<td class="px-5 py-3">
<a href="{{ route('user.links.show', $link) }}" class="font-medium text-slate-900 hover:text-emerald-700">
{{ $link->label ?: $link->slug }}
</a>
<p class="text-emerald-600">{{ $link->publicUrl() }}</p>
</td>
<td class="max-w-xs truncate px-5 py-3 text-slate-500">{{ $link->destination_url }}</td>
<td class="px-5 py-3 text-slate-700">{{ number_format($link->clicks_total) }}</td>
<td class="px-5 py-3">
@if($link->is_active && ! $link->isExpired())
<span class="rounded-full bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-700">Active</span>
@else
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-xs font-medium text-slate-600">Inactive</span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="border-t border-slate-100 px-5 py-3">{{ $links->links() }}</div>
@endif
</div>
</div>
</x-user-layout>