feat: fix auth, provider health checks, search, and redesign UI
- Fix register/login: dict-style access on UserTable ORM objects - Fix HTMX auth: inject JWT token in all HTMX request headers - Fix FS7 search: use DLE AJAX endpoint /engine/ajax/search.php - Fix ZT search: use ?p=series&search=QUERY (not DLE format) - Fix provider health: load hardcoded providers + domain manager - Add self.id to all anime/series providers - Redesign homepage: Netflix-style horizontal scroll cards (.hc) - Redesign search results: grouped by title, poster + synopsis + 3 buttons - Add Télécharger dropdown: season download + episode picker - Fix navbar CSS: restore .tabs flex layout, remove orphan rules - Fix HTMX spinner: remove inline display:none, use CSS indicator - Add AGENTS.md files across project for developer documentation
This commit is contained in:
+14
-3
@@ -18,6 +18,16 @@
|
||||
[x-cloak] { display: none !important; }
|
||||
</style>
|
||||
|
||||
<!-- Configure HTMX to include auth token in all requests -->
|
||||
<script>
|
||||
document.addEventListener('htmx:configRequest', (event) => {
|
||||
const token = localStorage.getItem('auth_token');
|
||||
if (token) {
|
||||
event.detail.headers['Authorization'] = `Bearer ${token}`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Legacy JavaScript (Refactored to HTMX/Alpine) -->
|
||||
<script src="/static/js/auth.js?v=1.10" defer></script>
|
||||
<script src="/static/js/api.js?v=1.11" defer></script>
|
||||
@@ -46,14 +56,15 @@
|
||||
isAuthenticated: true,
|
||||
username: '',
|
||||
init() {
|
||||
console.log('Global app state ready');
|
||||
window.addEventListener('auth-success', (e) => {
|
||||
console.log('Alpine auth-success received');
|
||||
this.isAuthenticated = true;
|
||||
this.username = e.detail.username;
|
||||
});
|
||||
window.addEventListener('auth-logout', () => {
|
||||
this.isAuthenticated = false;
|
||||
this.username = '';
|
||||
});
|
||||
window.addEventListener('set-tab', (e) => {
|
||||
console.log('Alpine set-tab received:', e.detail.tab);
|
||||
this.activeTab = e.detail.tab;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user