From 142e6bac9c3117376999622ffd169071716238f1 Mon Sep 17 00:00:00 2001 From: Lucie Bader <167515375+Lucie-Bdr@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:57:55 +0100 Subject: [PATCH] Affichage/masquage bouton afficher stats --- src/popup/popup.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/popup/popup.js b/src/popup/popup.js index f243a0e..122b11c 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"; -- GitLab