b6f12b2162
- Created a unified button system in style.css with primary, secondary, and icon variants. - Standardized cards, inputs, and layout components for a more premium look. - Refactored header, login, anime/series cards, and watchlist/downloads sections to use the new design system. - Cleaned up inline styles and redundant local style blocks in templates. - Updated JS-generated buttons to follow the new global styling.
57 lines
2.7 KiB
HTML
57 lines
2.7 KiB
HTML
{% if tasks %}
|
|
<div class="downloads-grid">
|
|
{% for task in tasks %}
|
|
<div class="download-item task-{{ task.status }}">
|
|
<div class="download-info">
|
|
<span class="download-name" title="{{ task.filename }}">{{ task.filename }}</span>
|
|
<span class="badge badge-{{ task.status }}">{{ task.status | upper }}</span>
|
|
</div>
|
|
|
|
<div class="progress-container">
|
|
<div class="progress-bar" style="width: {{ task.progress }}%"></div>
|
|
</div>
|
|
|
|
<div class="download-meta">
|
|
<span>{{ task.progress | round(1) }}%</span>
|
|
<span>{{ task.speed or '0' }} KB/s</span>
|
|
<span>{{ task.eta or '' }}</span>
|
|
</div>
|
|
|
|
<div class="download-actions">
|
|
{% if task.status == 'downloading' or task.status == 'pending' %}
|
|
<button class="btn-icon" hx-post="/api/downloads/{{ task.id }}/pause" hx-swap="none">
|
|
<i class="fas fa-pause"></i>
|
|
</button>
|
|
{% elif task.status == 'paused' %}
|
|
<button class="btn-icon success" hx-post="/api/downloads/{{ task.id }}/resume" hx-swap="none">
|
|
<i class="fas fa-play"></i>
|
|
</button>
|
|
{% endif %}
|
|
|
|
{% if task.status == 'completed' %}
|
|
<a href="/video/{{ task.id }}" class="btn-icon success" title="Voir la vidéo">
|
|
<i class="fas fa-external-link-alt"></i>
|
|
</a>
|
|
<a href="/downloads/{{ task.filename }}" class="btn-icon" download title="Télécharger le fichier">
|
|
<i class="fas fa-file-download"></i>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<button class="btn-icon danger"
|
|
hx-delete="/api/downloads/{{ task.id }}"
|
|
hx-confirm="Supprimer ce téléchargement ?"
|
|
hx-swap="none"
|
|
title="Supprimer">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state" style="text-align: center; padding: 60px 20px; color: var(--text-dim);">
|
|
<i class="fas fa-cloud-download-alt" style="font-size: 3rem; margin-bottom: 20px; opacity: 0.1; display: block;"></i>
|
|
<p>Aucun téléchargement en cours</p>
|
|
</div>
|
|
{% endif %}
|