feat: frontend modernization with HTMX, Alpine.js and Plyr (Phase 3)
- Integrated HTMX for server-driven UI updates and fragments - Adopted Alpine.js for global reactive state and tab management - Replaced legacy player with Plyr.io for premium streaming experience - Implemented real-time download polling via HTMX - Added server-sent Toast notification system - Fixed navigation and authentication scoping issues
This commit is contained in:
@@ -1,37 +1,49 @@
|
||||
<!-- Watchlist Section: Scheduler, Filters & Items -->
|
||||
<!-- Scheduler Status -->
|
||||
<div class="scheduler-status" id="schedulerStatus">
|
||||
<div class="scheduler-status-header">
|
||||
<div>
|
||||
<h3>⏰ Planificateur Automatique</h3>
|
||||
<div id="nextRunInfo" class="next-run-info">Chargement...</div>
|
||||
</div>
|
||||
<div class="scheduler-controls">
|
||||
<button id="startSchedulerBtn" class="btn-primary btn-small watchlist-btn-small" onclick="handleStartScheduler()" style="display:none;">
|
||||
▶️ Démarrer
|
||||
</button>
|
||||
<button id="stopSchedulerBtn" class="btn-secondary btn-small watchlist-btn-small" onclick="handleStopScheduler()" style="display:none;">
|
||||
⏸️ Arrêter
|
||||
</button>
|
||||
<button class="btn-secondary btn-small watchlist-btn-small" onclick="handleCheckAll()">
|
||||
🔍 Vérifier tout
|
||||
</button>
|
||||
<button class="btn-secondary btn-small watchlist-btn-small" onclick="handleOpenSettings()">
|
||||
⚙️ Paramètres
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-container">
|
||||
<div class="section-header">
|
||||
<h2>📋 Ma Watchlist</h2>
|
||||
<div class="header-actions">
|
||||
<button class="btn btn-sm btn-primary" hx-post="/api/watchlist/check" hx-swap="none">
|
||||
<i class="fas fa-sync"></i> Vérifier épisodes
|
||||
</button>
|
||||
<button class="btn btn-sm btn-secondary"
|
||||
hx-get="/api/watchlist"
|
||||
hx-target="#watchlist-items-container">
|
||||
<i class="fas fa-redo"></i> Actualiser
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filter Tabs -->
|
||||
<div class="filter-tabs">
|
||||
<button class="filter-tab active" onclick="filterWatchlist('all', this)">Tous</button>
|
||||
<button class="filter-tab" onclick="filterWatchlist('active', this)">Actifs</button>
|
||||
<button class="filter-tab" onclick="filterWatchlist('paused', this)">En pause</button>
|
||||
<button class="filter-tab" onclick="filterWatchlist('completed', this)">Terminés</button>
|
||||
<!-- Watchlist items container loaded via HTMX on page load or manual refresh -->
|
||||
<div id="watchlist-items-container"
|
||||
hx-get="/api/watchlist"
|
||||
hx-trigger="load"
|
||||
class="watchlist-content">
|
||||
<div class="loading-placeholder">
|
||||
<div class="spinner"></div> Chargement de votre watchlist...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Watchlist Items -->
|
||||
<div id="watchlistContainer">
|
||||
<div class="watchlist-loading">Chargement de la watchlist...</div>
|
||||
</div>
|
||||
<style>
|
||||
.watchlist-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.watchlist-item {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
padding: 15px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.watchlist-item:hover { transform: translateY(-3px); border-color: #00d9ff; }
|
||||
.item-poster img { width: 80px; height: 120px; border-radius: 8px; object-fit: cover; }
|
||||
.item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
|
||||
.item-info h3 { font-size: 1rem; margin-bottom: 5px; color: #fff; }
|
||||
.item-meta { display: flex; gap: 8px; margin-bottom: 8px; }
|
||||
.item-actions { display: flex; gap: 10px; margin-top: 10px; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user