Files
ladill-link/resources/views/links/dashboard.blade.php
T
isaaccladandCursor 04abc3db05
Deploy Ladill Link / deploy (push) Successful in 27s
Use + icon buttons on mobile dashboards.
Sync mobile-header-btn partials, mobile x-btn.create, and update dashboard header actions for consistent mobile FABs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 16:21:28 +00:00

53 lines
2.7 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 items-center justify-between gap-3">
<div class="min-w-0 flex-1">
<h1 class="truncate text-lg font-semibold text-slate-900 lg:text-2xl">Overview</h1>
<p class="mt-1 hidden text-sm text-slate-500 sm:block">Short links on <span class="font-medium text-emerald-700">ladl.link</span> billed from your Ladill wallet</p>
</div>
@include('partials.mobile-header-btn', [
'href' => route('user.links.create'),
'label' => 'Create link',
'variant' => 'primary',
])
</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>