Separate tabs for pending and downloaded in media history (#508)

* Separate tabs for pending and downloaded in media history
 - closes #504

* correct query for pending state and remove unecessary assign

* correct pending where

---------

Co-authored-by: robs <git@robs.social>
This commit is contained in:
Robert Kleinschusterandrobs authored and GitHub committed 2024-12-13 08:58:42 -08:00
1 parent 01c9afa1c3
commit e56f39a158
2 files changed
+27 -7

No files matched your search

@@ -41,9 +41,22 @@
<div class="rounded-sm border shadow-default border-strokedark bg-boxdark mt-4 p-5">
<span class="text-2xl font-medium mb-4">Media History</span>
<section class="mt-6">
{live_render(@conn, Pinchflat.Pages.HistoryTableLive)}
</section>
<.tabbed_layout>
<:tab title="Downloaded" id="downloaded">
{live_render(
@conn,
Pinchflat.Pages.HistoryTableLive,
session: %{"media_state" => "downloaded"}
)}
</:tab>
<:tab title="Pending" id="pending">
{live_render(
@conn,
Pinchflat.Pages.HistoryTableLive,
session: %{"media_state" => "pending"}
)}
</:tab>
</.tabbed_layout>
</div>
<div class="rounded-sm border shadow-default border-strokedark bg-boxdark mt-4 p-5">