From 725034dd4e35cdb48ea701674053a9036c9ef998 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Tue, 3 Jun 2025 11:14:38 -0500 Subject: [PATCH] fix: shows download progress --- src/Twig/Components/DownloadListRow.php | 14 ++++++ templates/broadcast/Download.stream.html.twig | 49 +++---------------- templates/components/DownloadList.html.twig | 37 +------------- .../components/DownloadListRow.html.twig | 36 ++++++++++++++ 4 files changed, 58 insertions(+), 78 deletions(-) create mode 100644 src/Twig/Components/DownloadListRow.php create mode 100644 templates/components/DownloadListRow.html.twig diff --git a/src/Twig/Components/DownloadListRow.php b/src/Twig/Components/DownloadListRow.php new file mode 100644 index 0000000..1def6f0 --- /dev/null +++ b/src/Twig/Components/DownloadListRow.php @@ -0,0 +1,14 @@ + {% endblock %} {% block update %} {% if entity.status != "Complete" %} - + {% else %} @@ -54,23 +35,7 @@ {% endif %} diff --git a/templates/components/DownloadList.html.twig b/templates/components/DownloadList.html.twig index ab6e10d..637c180 100644 --- a/templates/components/DownloadList.html.twig +++ b/templates/components/DownloadList.html.twig @@ -31,42 +31,7 @@ {% if this.downloads.items|length > 0 %} {% for download in this.downloads.items %} - - - {{ download.title }} - - - {% if this.isWidget == false %} - - {{ download.filename }} - - - {{ download.mediaType }} - - {% endif %} - - - {% if download.progress < 100 %} -
-
- {{ download.progress }}% -
-
- {% else %} - - {% endif %} - - - - - + {% endfor %} {% if this.isWidget == true and this.downloads.items|length > this.perPage %} diff --git a/templates/components/DownloadListRow.html.twig b/templates/components/DownloadListRow.html.twig new file mode 100644 index 0000000..12f44c9 --- /dev/null +++ b/templates/components/DownloadListRow.html.twig @@ -0,0 +1,36 @@ + + + {{ download.title }} + + + {% if isWidget == false %} + + {{ download.filename }} + + + {{ download.mediaType }} + + {% endif %} + + + {% if download.progress < 100 %} +
+
+ {{ download.progress }}% +
+
+ {% else %} + + {% endif %} + + + + + \ No newline at end of file