Files
ladill-link/resources/views/links/dashboard.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

52 lines
2.8 KiB
PHP

<x-user-layout>
<x-slot name="title">Dashboard</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">Overview</h1>
<p class="mt-1 text-sm text-slate-500">Short links on <span class="font-medium text-emerald-700">ladl.link</span> GHS {{ number_format($pricePerLink, 2) }} 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="grid gap-4 sm:grid-cols-3">
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Links created</p>
<p class="mt-1 text-3xl font-semibold text-slate-900">{{ number_format($wallet->links_total) }}</p>
</div>
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Total clicks</p>
<p class="mt-1 text-3xl font-semibold text-slate-900">{{ number_format($wallet->clicks_total) }}</p>
</div>
<div class="rounded-xl border border-slate-200 bg-white p-5">
<p class="text-sm text-slate-500">Price per link</p>
<p class="mt-1 text-3xl font-semibold text-emerald-700">GHS {{ number_format($pricePerLink, 2) }}</p>
</div>
</div>
@if($recentLinks->isNotEmpty())
<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">Recent links</h2>
</div>
<ul class="divide-y divide-slate-100">
@foreach($recentLinks as $link)
<li class="flex items-center justify-between gap-4 px-5 py-3">
<div class="min-w-0">
<a href="{{ route('user.links.show', $link) }}" class="font-medium text-slate-900 hover:text-emerald-700">
{{ $link->label ?: $link->slug }}
</a>
<p class="truncate text-sm text-emerald-600">{{ $link->publicUrl() }}</p>
</div>
<span class="shrink-0 text-sm text-slate-500">{{ number_format($link->clicks_total) }} clicks</span>
</li>
@endforeach
</ul>
</div>
@endif
</div>
</x-user-layout>