96b12b66e2
- Neutralized downloads.js, watchlist-ui.js, and anime.js to prevent conflicts with HTMX - Guaranteed HTML responses in router_downloads.py via strict header detection - Unified frontend logic to follow the new server-driven architecture
19 lines
557 B
JavaScript
19 lines
557 B
JavaScript
/**
|
|
* Watchlist UI (Legacy - Modernized to HTMX)
|
|
*/
|
|
|
|
async function displayWatchlist() {
|
|
console.log('Legacy displayWatchlist called - redirected to HTMX');
|
|
if (typeof htmx !== 'undefined') {
|
|
htmx.trigger('#watchlist-items-container', 'load');
|
|
}
|
|
}
|
|
|
|
// Global exposure for legacy calls
|
|
window.displayWatchlist = displayWatchlist;
|
|
window.handleDeleteFromWatchlist = (id) => {
|
|
if (confirm('Retirer de la watchlist ?')) {
|
|
htmx.ajax('DELETE', `/api/watchlist/${id}`, { target: `#watchlist-${id}`, swap: 'outerHTML' });
|
|
}
|
|
};
|