fix: adds download record at time of download
This commit is contained in:
@@ -11,7 +11,13 @@
|
||||
<span class="w-4 inline-block text-center text-gray-50">{{ entity.progress }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr id="ad_download_{{ entity.id }}">
|
||||
</tr>
|
||||
</template>
|
||||
</turbo-stream>
|
||||
|
||||
<turbo-stream action="prepend" target="alert_list">
|
||||
<template>
|
||||
<twig:Alert title="Success" message="{{ entity.title }} has been added to the Download queue" alert_id="{{ entity.id }}" data-controller="alert" />
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% endblock %}
|
||||
@@ -20,16 +26,14 @@
|
||||
{% if entity.status != "Complete" %}
|
||||
<turbo-stream action="update" target="ad_download_{{ id }}">
|
||||
<template>
|
||||
<tr id="ad_download_{{ entity.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">
|
||||
{{ entity.title }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-end text-gray-800 dark:text-gray-50">
|
||||
<span class="p-1.5 bg-purple-600 rounded-full">
|
||||
<span class="w-4 inline-block text-center text-gray-50">{{ entity.progress }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<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">
|
||||
{{ entity.title }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-end text-gray-800 dark:text-gray-50">
|
||||
<span class="p-1.5 bg-purple-600 rounded-full">
|
||||
<span class="w-4 inline-block text-center text-gray-50">{{ entity.progress }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% else %}
|
||||
@@ -42,18 +46,20 @@
|
||||
</template>
|
||||
</turbo-stream>
|
||||
|
||||
{# <turbo-stream action="prepend" target="complete_downloads_list">#}
|
||||
{# <template>#}
|
||||
{# <div class="result_group download-item" id="cd_download_{{ entity.id }}">#}
|
||||
{# <div class="title">{{ entity.title }}</div>#}
|
||||
{# <div class="filename">{{ entity.filename }}</div>#}
|
||||
{# <div class="status">#}
|
||||
{# <span class="pill {{ status_color_map[entity.status] }} status-badge">{{ entity.status }}</span>#}
|
||||
{# <span class="pill progress">{{ entity.progress }}%</span>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# </template>#}
|
||||
{# </turbo-stream>#}
|
||||
<turbo-stream action="prepend" target="recent_downloads">
|
||||
<template>
|
||||
<tr id="recent_download_{{ entity.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">
|
||||
{{ entity.title }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-end text-gray-800 dark:text-gray-50">
|
||||
<span class="p-1.5 bg-purple-600 rounded-full">
|
||||
<span class="w-4 inline-block text-center text-gray-50">{{ entity.progress }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</turbo-stream>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user