mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
* WIP - started improving handling of sorting for sources index table * WIP - Added UI to table to indicate sort column and direction * Refactored toggle liveview into a livecomponent * Added sorting for all table attrs * Added pagination to the sources table * Added tests for updated liveviews and live components * Add tests for new helper methods * Added fancy new CSS to my sources table * Added size to sources table * Adds relative div to ensure that sorting arrow doesn't run away * Fixed da tests
22 lines
787 B
Text
22 lines
787 B
Text
<div class="mb-6 flex gap-3 flex-row items-center justify-between">
|
|
<h2 class="text-title-md2 font-bold text-black dark:text-white">Sources</h2>
|
|
<nav>
|
|
<.link href={~p"/sources/new"}>
|
|
<.button color="bg-primary" rounding="rounded-lg">
|
|
<span class="font-bold mx-2">+</span> New <span class="hidden sm:inline pl-1">Source</span>
|
|
</.button>
|
|
</.link>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
|
<div class="max-w-full overflow-x-auto">
|
|
{live_render(@conn, PinchflatWeb.Sources.SourceLive.IndexTableLive,
|
|
session: %{
|
|
"initial_sort_key" => :custom_name,
|
|
"initial_sort_direction" => :asc,
|
|
"results_per_page" => 10
|
|
}
|
|
)}
|
|
</div>
|
|
</div>
|