Files
ohm_streaming/templates/components/downloads_section.html
root 2127cc10cd
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled
fix: robust HTML delivery for downloads section
- Decoupled downloads container from main template to prevent static rendering errors
- Forced HTMX polling to use html=1 parameter
- Added server-side debug logging for request format detection
- Fixed Jinja2 loop error by ensuring tasks are provided via HTMX
2026-03-24 14:21:08 +00:00

29 lines
951 B
HTML

<div class="section-container">
<div class="section-header">
<h2>📥 Téléchargements</h2>
<div class="header-actions">
<button class="btn btn-sm btn-secondary"
hx-post="/api/downloads/cleanup"
hx-swap="none"
hx-on::after-request="htmx.trigger('#downloads-container-inner', 'refresh')">
Nettoyer terminés
</button>
</div>
</div>
<!-- Container that loads content via HTMX -->
<div id="downloads-container-inner"
hx-get="/api/downloads?html=1"
hx-trigger="load, refresh, every 3s"
hx-swap="innerHTML">
<div class="loading-placeholder">
<div class="spinner"></div> Chargement des téléchargements...
</div>
</div>
</div>
<style>
.section-container { margin-bottom: 40px; }
/* Styles already defined or moved to downloads_list.html */
</style>