diff --git a/frontend/index.html b/frontend/index.html index 2f39334..5507458 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2043,6 +2043,7 @@ + diff --git a/frontend/js/config.js b/frontend/js/config.js index 6dee151..11c07d9 100644 --- a/frontend/js/config.js +++ b/frontend/js/config.js @@ -1546,6 +1546,7 @@ function initProfile() { var langSel = document.getElementById('profile-lang'); var nameInp = document.getElementById('profile-name'); var saveBtn = document.getElementById('profile-save'); + var logoutBtn = document.getElementById('profile-logout'); var savedEl = document.getElementById('profile-saved'); if (!langSel || !saveBtn) return; @@ -1564,4 +1565,15 @@ function initProfile() { if (savedEl) { savedEl.style.display = 'inline'; setTimeout(function() { savedEl.style.display = 'none'; }, 2000); } } catch(e) {} }); + + // Logout button + if (logoutBtn) { + logoutBtn.addEventListener('click', function() { + if (confirm('Voulez-vous vraiment vous deconnecter ?')) { + fetch('/api/auth/logout', { method: 'POST' }) + .then(function() { window.location.reload(); }) + .catch(function() { window.location.reload(); }); + } + }); + } } diff --git a/frontend/style.css b/frontend/style.css index 89610f0..ddd5d45 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -2228,6 +2228,13 @@ select { } .profile-hint { display: block; font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; } .profile-saved { font-size: 0.7rem; color: var(--accent-green); margin-left: 10px; } +.config-save-btn { + padding: 6px 18px; font-size: 0.75rem; font-weight: 600; + background: var(--accent); color: #fff; + border: 1px solid var(--accent); border-radius: 6px; + cursor: pointer; transition: opacity 0.15s; +} +.config-save-btn:hover { opacity: 0.85; } .saved-search-vault { font-size: 0.65rem; color: var(--text-muted);