truncate table columns via css (#507)

- closes #506

Co-authored-by: robs <git@robs.social>
This commit is contained in:
Robert Kleinschuster
2024-12-13 17:57:32 +01:00
committed by GitHub
parent 5371b5d236
commit 01c9afa1c3
5 changed files with 12 additions and 12 deletions
@@ -11,9 +11,9 @@ defmodule PinchflatWeb.Sources.IndexTableLive do
def render(assigns) do
~H"""
<.table rows={@sources} table_class="text-white">
<:col :let={source} label="Name">
<:col :let={source} label="Name" class="truncate max-w-xs">
<.subtle_link href={~p"/sources/#{source.id}"}>
{StringUtils.truncate(source.custom_name || source.collection_name, 35)}
{source.custom_name || source.collection_name}
</.subtle_link>
</:col>
<:col :let={source} label="Pending">
@@ -46,9 +46,9 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do
</div>
</header>
<.table rows={@records} table_class="text-white">
<:col :let={media_item} label="Title">
<:col :let={media_item} label="Title" class="truncate max-w-xs">
<.subtle_link href={~p"/sources/#{@source.id}/media/#{media_item.id}"}>
{StringUtils.truncate(media_item.title, 50)}
{media_item.title}
</.subtle_link>
</:col>
<:col :let={media_item} :if={@media_state == "other"} label="Manually Ignored?">