fix: limits active download list to 5 items

This commit is contained in:
2025-05-12 16:33:47 -05:00
parent eed2e70d21
commit 6ad10a585d
4 changed files with 54 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
<div{{ attributes }} class="min-w-48">
<div{{ attributes.defaults(stimulus_controller('download_list')) }} class="min-w-48" >
{% set table_body_id = (type == "complete") ? "complete_downloads" : "active_downloads" %}
<table id="downloads" class="divide-y divide-gray-200 bg-gray-50 overflow-hidden rounded-lg table-fixed" {{ turbo_stream_listen('App\\Download\\Framework\\Entity\\Download') }}>
<thead>
@@ -16,7 +16,7 @@
<tbody id="{{ table_body_id }}" class="divide-y divide-gray-200 dark:divide-gray-50">
{% if this.downloads|length > 0 %}
{% for download in this.downloads %}
<tr id="ad_download_{{ download.id }}">
<tr id="ad_download_{{ download.id }}">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-stone-800 min-w-[45ch] max-w-[45ch] truncate">
{{ download.title }}
</td>