Actualiser js/admin.js

This commit is contained in:
2026-06-22 11:10:35 +02:00
parent 34d99ee5b7
commit 2cdbbc3cf8
+5
View File
@@ -387,6 +387,7 @@ function openEditModal(id) {
} }
function closeAdminModal() { document.getElementById('admin-modal').classList.remove('open'); } function closeAdminModal() { document.getElementById('admin-modal').classList.remove('open'); }
async function openConfigModal() { async function openConfigModal() {
document.getElementById('config-modal').classList.add('open'); document.getElementById('config-modal').classList.add('open');
@@ -401,12 +402,16 @@ async function openConfigModal() {
if (data.tmdb_api_key) document.getElementById('tmdb-key-input').placeholder = '✅ Clé configurée (laisser vide pour ne pas changer)'; if (data.tmdb_api_key) document.getElementById('tmdb-key-input').placeholder = '✅ Clé configurée (laisser vide pour ne pas changer)';
} catch(e) { console.error(e); } } catch(e) { console.error(e); }
} }
function closeConfigModal() { document.getElementById('config-modal').classList.remove('open'); } function closeConfigModal() { document.getElementById('config-modal').classList.remove('open'); }
function openPasswordModal() { function openPasswordModal() {
document.getElementById('pwd-error').style.display = 'none'; document.getElementById('pwd-error').style.display = 'none';
document.getElementById('password-modal').classList.add('open'); document.getElementById('password-modal').classList.add('open');
} }
function closePasswordModal() { document.getElementById('password-modal').classList.remove('open'); } function closePasswordModal() { document.getElementById('password-modal').classList.remove('open'); }
function logout() { function logout() {
localStorage.removeItem('token'); localStorage.removeItem('token');
window.location.href = 'login.html'; window.location.href = 'login.html';