Aggregate ladl.link slugs from all platform apps in the link list.
Deploy Ladill Link / deploy (push) Successful in 29s
Deploy Ladill Link / deploy (push) Successful in 29s
Sync QR and storefront short codes from sibling apps via a platform catalog API so My Links shows every ladl.link URL in one place. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
<tr>
|
||||
<th class="px-5 py-3">Link</th>
|
||||
<th class="px-5 py-3">Destination</th>
|
||||
<th class="px-5 py-3">App</th>
|
||||
<th class="px-5 py-3">Clicks</th>
|
||||
<th class="px-5 py-3">Status</th>
|
||||
</tr>
|
||||
@@ -37,6 +38,9 @@
|
||||
<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">
|
||||
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-xs font-medium text-slate-600">{{ $link->sourceAppLabel() }}</span>
|
||||
</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())
|
||||
|
||||
@@ -3,19 +3,35 @@
|
||||
<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>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<h1 class="text-2xl font-semibold text-slate-900">{{ $link->label ?: $link->slug }}</h1>
|
||||
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-xs font-medium text-slate-600">{{ $link->sourceAppLabel() }}</span>
|
||||
</div>
|
||||
<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>
|
||||
@if ($link->is_managed_here)
|
||||
<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>
|
||||
@elseif ($link->manage_url)
|
||||
<a href="{{ $link->manage_url }}" target="_blank" rel="noopener"
|
||||
class="inline-flex items-center rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
||||
Manage in {{ $link->sourceAppLabel() }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if (! $link->is_managed_here)
|
||||
<div class="rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900">
|
||||
This ladl.link slug was created in {{ $link->sourceAppLabel() }}. Edit it there — changes sync back here automatically.
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<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>
|
||||
@@ -31,29 +47,36 @@
|
||||
</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')
|
||||
@if ($link->is_managed_here)
|
||||
<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>
|
||||
<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>
|
||||
@else
|
||||
<div class="rounded-xl border border-slate-200 bg-white p-6">
|
||||
<p class="text-sm font-medium text-slate-700">Destination</p>
|
||||
<p class="mt-1 text-sm text-slate-600">{{ $link->destination_url }}</p>
|
||||
</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>
|
||||
@endif
|
||||
</div>
|
||||
</x-user-layout>
|
||||
|
||||
Reference in New Issue
Block a user