62 lines
3.4 KiB
PHP
62 lines
3.4 KiB
PHP
<div>
|
|
@php $ws = current_workspace(); @endphp
|
|
<div class="flex items-center justify-between mb-6">
|
|
<h1 class="text-2xl font-semibold text-t1">Link-in-Bio</h1>
|
|
@if($ws)
|
|
<button
|
|
@click="$dispatch('openModal', {component: 'modals.create-bio-page', arguments: {workspaceUlid: '{{ $ws->ulid }}'}})"
|
|
class="px-4 py-2 bg-accent-gradient text-white rounded-lg text-sm font-medium hover:opacity-90 transition-opacity">
|
|
+ New Bio Page
|
|
</button>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="bg-s1 border border-white/[.06] rounded-xl overflow-hidden">
|
|
@forelse($bioPages as $page)
|
|
<div class="flex items-center gap-4 px-5 py-4 border-b border-white/[.04] group hover:bg-white/[.02] transition-colors">
|
|
<div class="w-10 h-10 bg-s2 rounded-lg flex items-center justify-center flex-shrink-0">
|
|
<svg class="w-5 h-5 text-t3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5M3.75 17.25h7.5"/>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
<div class="text-sm font-medium text-t1">{{ is_array($page->title) ? ($page->title['en'] ?? $page->slug) : ($page->title ?? $page->slug) }}</div>
|
|
<div class="text-xs text-t2 font-mono">nimu.li/{{ $page->slug }}</div>
|
|
</div>
|
|
<span class="text-xs px-2 py-0.5 rounded-full {{ $page->is_published ? 'bg-green/10 text-green' : 'bg-white/[.06] text-t3' }}">
|
|
{{ $page->is_published ? 'Published' : 'Draft' }}
|
|
</span>
|
|
<div class="flex items-center gap-3 opacity-0 group-hover:opacity-100 transition-opacity">
|
|
<button
|
|
@click="$dispatch('openModal', {component: 'modals.edit-bio-page', arguments: {bioUlid: '{{ $page->ulid }}'}})"
|
|
class="text-t2 text-xs hover:text-t1">Edit</button>
|
|
<button
|
|
@click="$dispatch('openModal', {component: 'modals.delete-bio-page', arguments: {bioUlid: '{{ $page->ulid }}'}})"
|
|
class="text-red text-xs hover:opacity-80">Delete</button>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<div class="p-12 text-center">
|
|
<div class="w-16 h-16 bg-s2 rounded-2xl flex items-center justify-center mx-auto mb-4">
|
|
<svg class="w-8 h-8 text-t3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5M3.75 17.25h7.5"/>
|
|
</svg>
|
|
</div>
|
|
<h3 class="text-lg font-medium text-t1 mb-2">No bio pages yet</h3>
|
|
<p class="text-sm text-t2 mb-6">Create a beautiful link-in-bio page for Instagram, TikTok and more.</p>
|
|
@if($ws)
|
|
<button
|
|
@click="$dispatch('openModal', {component: 'modals.create-bio-page', arguments: {workspaceUlid: '{{ $ws->ulid }}'}})"
|
|
class="px-4 py-2.5 bg-accent-gradient text-white rounded-lg text-sm font-medium hover:opacity-90 transition-opacity">
|
|
Create your first Bio Page
|
|
</button>
|
|
@endif
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
|
|
@if($bioPages->hasPages())
|
|
<div class="mt-4">{{ $bioPages->links() }}</div>
|
|
@endif
|
|
</div>
|