Scaffolded from the Ladill mini/events extraction pattern: multi-file transfers, retention controls, public landing pages, analytics, and Gitea deploy workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
51 lines
3.0 KiB
PHP
51 lines
3.0 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Transfers</x-slot>
|
|
<div class="space-y-6">
|
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-900">Transfers</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Share files with a link and QR code.</p>
|
|
</div>
|
|
<a href="{{ route('transfer.transfers.create') }}" class="inline-flex rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700">New transfer</a>
|
|
</div>
|
|
|
|
@if($transfers->isEmpty())
|
|
<div class="rounded-2xl border border-dashed border-slate-200 bg-white px-6 py-12 text-center">
|
|
<p class="text-sm text-slate-500">No active transfers yet.</p>
|
|
<a href="{{ route('transfer.transfers.create') }}" class="mt-3 inline-block text-sm font-semibold text-indigo-600 hover:text-indigo-800">Create your first transfer</a>
|
|
</div>
|
|
@else
|
|
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<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-6 py-3">Title</th>
|
|
<th class="px-6 py-3">Files</th>
|
|
<th class="px-6 py-3">Downloads</th>
|
|
<th class="px-6 py-3">Expires</th>
|
|
<th class="px-6 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100 text-sm">
|
|
@foreach($transfers as $transfer)
|
|
<tr class="hover:bg-slate-50/80">
|
|
<td class="px-6 py-4">
|
|
<p class="font-medium text-slate-900">{{ $transfer->title }}</p>
|
|
<p class="text-xs text-slate-500">{{ $transfer->created_at->format('M j, Y') }}</p>
|
|
</td>
|
|
<td class="px-6 py-4 text-slate-600">{{ $transfer->files->count() }}</td>
|
|
<td class="px-6 py-4 text-slate-600">{{ number_format($transfer->downloads_total) }}</td>
|
|
<td class="px-6 py-4 text-slate-600">{{ $transfer->expires_at?->format('M j, Y') ?? '—' }}</td>
|
|
<td class="px-6 py-4 text-right">
|
|
<a href="{{ route('transfer.transfers.show', $transfer) }}" class="font-medium text-indigo-600 hover:text-indigo-800">Open</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div>{{ $transfers->links() }}</div>
|
|
@endif
|
|
</div>
|
|
</x-user-layout>
|