mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
truncate table columns via css (#507)
- closes #506 Co-authored-by: robs <git@robs.social>
This commit is contained in:
parent
5371b5d236
commit
01c9afa1c3
5 changed files with 12 additions and 12 deletions
|
|
@ -28,9 +28,9 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
|||
</span>
|
||||
<div class="max-w-full overflow-x-auto">
|
||||
<.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/#{media_item.source_id}/media/#{media_item}"}>
|
||||
{StringUtils.truncate(media_item.title, 35)}
|
||||
{media_item.title}
|
||||
</.subtle_link>
|
||||
</:col>
|
||||
<:col :let={media_item} label="Upload Date">
|
||||
|
|
@ -42,9 +42,9 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
|||
<:col :let={media_item} label="Downloaded At">
|
||||
{format_datetime(media_item.media_downloaded_at)}
|
||||
</:col>
|
||||
<:col :let={media_item} label="Source">
|
||||
<:col :let={media_item} label="Source" class="truncate max-w-xs">
|
||||
<.subtle_link href={~p"/sources/#{media_item.source_id}"}>
|
||||
{StringUtils.truncate(media_item.source.custom_name, 35)}
|
||||
{media_item.source.custom_name}
|
||||
</.subtle_link>
|
||||
</:col>
|
||||
</.table>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ defmodule Pinchflat.Pages.JobTableLive do
|
|||
<:col :let={task} label="Task">
|
||||
{worker_to_task_name(task.job.worker)}
|
||||
</:col>
|
||||
<:col :let={task} label="Subject">
|
||||
<:col :let={task} label="Subject" class="truncate max-w-xs">
|
||||
<.subtle_link href={task_to_link(task)}>
|
||||
{StringUtils.truncate(task_to_record_name(task), 35)}
|
||||
{task_to_record_name(task)}
|
||||
</.subtle_link>
|
||||
</:col>
|
||||
<:col :let={task} label="Attempt No.">
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
<div class="flex flex-col gap-10 dark:text-white">
|
||||
<%= if match?([_|_], @search_results) do %>
|
||||
<.table rows={@search_results} table_class="text-black dark:text-white">
|
||||
<:col :let={result} label="Title">
|
||||
<:col :let={result} label="Title" class="truncate max-w-xs">
|
||||
<.subtle_link href={~p"/sources/#{result.source_id}/media/#{result.id}"}>
|
||||
{StringUtils.truncate(result.title, 35)}
|
||||
{result.title}
|
||||
</.subtle_link>
|
||||
</:col>
|
||||
<:col :let={result} label="Excerpt">
|
||||
|
|
|
|||
|
|
@ -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?">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue