fix: bouton Enregistrer + Deconnexion dans Profil — style harmonieux
CI / lint (push) Failing after 3s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after -8s

- config-save-btn: fond accent, texte blanc, border-radius 6px
- Bouton Deconnexion: fond danger-bg, texte danger
- Logout dans initProfile via /api/auth/logout
This commit is contained in:
2026-06-16 12:33:32 -04:00
parent 85efc068c4
commit 6c2a9f716a
3 changed files with 20 additions and 0 deletions
+12
View File
@@ -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(); });
}
});
}
}