Media downloading indexing options (round 2) (#14)
* Adds options + option builder + metadata parsing for media thumbnails * Added release-type options to media profile; built option parser for indexing operations * Added new media_profile options to creation form; made show helper for rendering database items * Added options for downloading/embedding metadata * Adds option on sources to not download media (index only) * reformatted docs
This commit is contained in:
@@ -535,7 +535,7 @@ defmodule PinchflatWeb.CoreComponents do
|
||||
|
||||
def list(assigns) do
|
||||
~H"""
|
||||
<div class="mt-14">
|
||||
<div class="mt-2 mb-14">
|
||||
<dl class="-my-4 divide-y divide-zinc-100">
|
||||
<div :for={item <- @item} class="flex gap-4 py-4 text-sm leading-6 sm:gap-8">
|
||||
<dt class="w-1/4 flex-none text-zinc-500"><%= item.title %></dt>
|
||||
@@ -546,6 +546,30 @@ defmodule PinchflatWeb.CoreComponents do
|
||||
"""
|
||||
end
|
||||
|
||||
@doc """
|
||||
Renders a data list from a given map. Used in development to
|
||||
quickly show the attributes of a database record.
|
||||
"""
|
||||
attr :map, :map, required: true
|
||||
|
||||
def list_items_from_map(assigns) do
|
||||
attrs =
|
||||
Enum.filter(assigns.map, fn
|
||||
{_, %{__struct__: _}} -> false
|
||||
_ -> true
|
||||
end)
|
||||
|
||||
assigns = assign(assigns, iterable_attributes: attrs)
|
||||
|
||||
~H"""
|
||||
<.list>
|
||||
<:item :for={{k, v} <- @iterable_attributes} title={k}>
|
||||
<%= v %>
|
||||
</:item>
|
||||
</.list>
|
||||
"""
|
||||
end
|
||||
|
||||
@doc """
|
||||
Renders a back navigation link.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user