2025-12-13 19:33:52 -06:00
|
|
|
<div class="mt-5 w-full mx-auto flex flex-col gap-5">
|
|
|
|
|
<h1 class="font-bold text-3xl mx-2 sm:mx-0">Lists</h1>
|
|
|
|
|
<x-ui.card>
|
2025-12-12 23:07:04 -06:00
|
|
|
<div class="w-full flex flex-col gap-2">
|
|
|
|
|
@if ($errors->any())
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
|
<ul>
|
|
|
|
|
@foreach ($errors->all() as $error)
|
|
|
|
|
<li class="text-red-500">{{ $error }}</li>
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
2025-12-13 19:33:52 -06:00
|
|
|
<form class="flex flex-col max-w-lg gap-2" wire:submit.prevent="addList">
|
|
|
|
|
<label class="font-bold" for="list_name">Add List</label>
|
2025-12-12 23:07:04 -06:00
|
|
|
<div class="flex">
|
2025-12-13 19:33:52 -06:00
|
|
|
<input name="list_name" placeholder="List Name"
|
|
|
|
|
class="flex-1 w-full text-black bg-white p-2 rounded rounded-r-none"
|
|
|
|
|
type="text"
|
2025-12-15 23:53:07 -06:00
|
|
|
wire:model.live="form.name">
|
2025-12-12 23:07:04 -06:00
|
|
|
<button type="submit" class="bg-green-400 text-white px-4 py-2 rounded rounded-l-none">Add</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-12-30 21:15:42 -06:00
|
|
|
<div class="w-full flex flex-col gap-5">
|
|
|
|
|
<h2 class="text-2xl font-bold">Your Lists</h2>
|
|
|
|
|
@if(!$lists->isEmpty())
|
|
|
|
|
<ul class="w-full flex flex-col gap-2">
|
|
|
|
|
<hr/>
|
|
|
|
|
@foreach($lists as $list)
|
|
|
|
|
<li class="flex justify-between text-center">
|
|
|
|
|
<a class="text-xl" href="/lists/{{$list->id}}" wire:navigate>{{$list->name}}</a>
|
|
|
|
|
@if((bool)$list->is_public === true)
|
|
|
|
|
<i class="fa fa-earth my-auto" title="Public" aria-label="Public"></i>
|
|
|
|
|
@else
|
|
|
|
|
<i class="fa fa-lock my-auto" title="Private" aria-label="Private"></i>
|
|
|
|
|
@endif
|
|
|
|
|
</li>
|
|
|
|
|
<hr/>
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
|
|
|
|
@else
|
|
|
|
|
<span>No lists found.</span>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="w-full flex flex-col gap-5">
|
|
|
|
|
<h2 class="text-2xl font-bold">Shared With You</h2>
|
|
|
|
|
@if(!$sharedLists->isEmpty())
|
|
|
|
|
<ul>
|
|
|
|
|
<hr/>
|
|
|
|
|
@foreach($sharedLists as $list)
|
|
|
|
|
<li class="flex justify-between text-center">
|
|
|
|
|
<a class="text-xl" href="/lists/{{$list->id}}" wire:navigate>{{$list->name}}</a>
|
|
|
|
|
@if((bool)$list->is_public === true)
|
|
|
|
|
<i class="fa fa-earth my-auto" title="Public" aria-label="Public"></i>
|
|
|
|
|
@else
|
|
|
|
|
<i class="fa fa-lock my-auto" title="Private" aria-label="Private"></i>
|
|
|
|
|
@endif
|
|
|
|
|
</li>
|
|
|
|
|
<hr/>
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
|
|
|
|
@else
|
|
|
|
|
<span>No lists found.</span>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
2025-12-13 19:33:52 -06:00
|
|
|
</x-ui.card>
|
2025-12-12 23:07:04 -06:00
|
|
|
</div>
|