add quick download button #720

This commit is contained in:
Ionuț Staicu 2025-05-13 12:10:17 +03:00
parent 1cee7a19ee
commit 0c3da6f3f2

View file

@ -56,6 +56,17 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do
>
<.icon name="hero-exclamation-circle-solid" class="text-red-500" />
</.tooltip>
<.link
href={~p"/sources/#{@source.id}/media/#{media_item.id}/force_download"}
:if={!media_item.prevent_download}
method="post"
target="_blank"
data-confirm="Are you sure you force a download of this media?"
>
<.icon name="hero-arrow-down-tray" />
</.link>
<span class="truncate">
<.subtle_link href={~p"/sources/#{@source.id}/media/#{media_item.id}"}>
{media_item.title}