diff --git a/src/popup/popup.js b/src/popup/popup.js index f243a0e2a66f47d52a3fba5b0fd743e4ac2ae5bf..122b11cde848e9d988935e141c8fc2816275f45f 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -77,6 +77,7 @@ async function updateOptionsUI() { const autoAddOptions = document.getElementById("auto-add-options"); const thresholdInput = document.getElementById("threshold"); const saveOptionsBtn = document.getElementById("save-options"); + const openStats = document.getElementById("open-stats"); if (autoAddContainer) { autoAddContainer.style.display = isLoggedIn ? "block" : "none"; @@ -89,6 +90,11 @@ async function updateOptionsUI() { ]) || { isTrackingActive: false }; if (toggleStatsBtn) { + if (!isLoggedIn) { + openStats.style.display = "none"; + } else { + openStats.style.display = "block"; + } if (!accessToken) { toggleStatsBtn.textContent = "Activer les statistiques"; toggleStatsBtn.style.opacity = "0.5";