truncate table columns via css (#507)
- closes #506 Co-authored-by: robs <git@robs.social>
This commit is contained in:
committed by
GitHub
parent
5371b5d236
commit
01c9afa1c3
@@ -28,9 +28,9 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
|||||||
</span>
|
</span>
|
||||||
<div class="max-w-full overflow-x-auto">
|
<div class="max-w-full overflow-x-auto">
|
||||||
<.table rows={@records} table_class="text-white">
|
<.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}"}>
|
<.subtle_link href={~p"/sources/#{media_item.source_id}/media/#{media_item}"}>
|
||||||
{StringUtils.truncate(media_item.title, 35)}
|
{media_item.title}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={media_item} label="Upload Date">
|
<:col :let={media_item} label="Upload Date">
|
||||||
@@ -42,9 +42,9 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
|||||||
<:col :let={media_item} label="Downloaded At">
|
<:col :let={media_item} label="Downloaded At">
|
||||||
{format_datetime(media_item.media_downloaded_at)}
|
{format_datetime(media_item.media_downloaded_at)}
|
||||||
</:col>
|
</: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}"}>
|
<.subtle_link href={~p"/sources/#{media_item.source_id}"}>
|
||||||
{StringUtils.truncate(media_item.source.custom_name, 35)}
|
{media_item.source.custom_name}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
</.table>
|
</.table>
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ defmodule Pinchflat.Pages.JobTableLive do
|
|||||||
<:col :let={task} label="Task">
|
<:col :let={task} label="Task">
|
||||||
{worker_to_task_name(task.job.worker)}
|
{worker_to_task_name(task.job.worker)}
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={task} label="Subject">
|
<:col :let={task} label="Subject" class="truncate max-w-xs">
|
||||||
<.subtle_link href={task_to_link(task)}>
|
<.subtle_link href={task_to_link(task)}>
|
||||||
{StringUtils.truncate(task_to_record_name(task), 35)}
|
{task_to_record_name(task)}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={task} label="Attempt No.">
|
<:col :let={task} label="Attempt No.">
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
<div class="flex flex-col gap-10 dark:text-white">
|
<div class="flex flex-col gap-10 dark:text-white">
|
||||||
<%= if match?([_|_], @search_results) do %>
|
<%= if match?([_|_], @search_results) do %>
|
||||||
<.table rows={@search_results} table_class="text-black dark:text-white">
|
<.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}"}>
|
<.subtle_link href={~p"/sources/#{result.source_id}/media/#{result.id}"}>
|
||||||
{StringUtils.truncate(result.title, 35)}
|
{result.title}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={result} label="Excerpt">
|
<:col :let={result} label="Excerpt">
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ defmodule PinchflatWeb.Sources.IndexTableLive do
|
|||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<.table rows={@sources} table_class="text-white">
|
<.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}"}>
|
<.subtle_link href={~p"/sources/#{source.id}"}>
|
||||||
{StringUtils.truncate(source.custom_name || source.collection_name, 35)}
|
{source.custom_name || source.collection_name}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={source} label="Pending">
|
<:col :let={source} label="Pending">
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<.table rows={@records} table_class="text-white">
|
<.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}"}>
|
<.subtle_link href={~p"/sources/#{@source.id}/media/#{media_item.id}"}>
|
||||||
{StringUtils.truncate(media_item.title, 50)}
|
{media_item.title}
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</:col>
|
</:col>
|
||||||
<:col :let={media_item} :if={@media_state == "other"} label="Manually Ignored?">
|
<:col :let={media_item} :if={@media_state == "other"} label="Manually Ignored?">
|
||||||
|
|||||||
Reference in New Issue
Block a user