From 0c3da6f3f2c621f93e28b6ff758ba6302300d78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20Staicu?= Date: Tue, 13 May 2025 12:10:17 +0300 Subject: [PATCH] add quick download button #720 --- .../sources/source_html/media_item_table_live.ex | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex index 604ee49..95dc9b0 100644 --- a/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex +++ b/lib/pinchflat_web/controllers/sources/source_html/media_item_table_live.ex @@ -56,6 +56,17 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do > <.icon name="hero-exclamation-circle-solid" class="text-red-500" /> + + <.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" /> + + <.subtle_link href={~p"/sources/#{@source.id}/media/#{media_item.id}"}> {media_item.title}