Skip to content
Snippets Groups Projects
Commit 142e6bac authored by Lucie Bader's avatar Lucie Bader
Browse files

Affichage/masquage bouton afficher stats

parent 571ebe21
No related branches found
No related tags found
2 merge requests!8Test final,!6Améliorations du menu de l'extension
...@@ -77,6 +77,7 @@ async function updateOptionsUI() { ...@@ -77,6 +77,7 @@ async function updateOptionsUI() {
const autoAddOptions = document.getElementById("auto-add-options"); const autoAddOptions = document.getElementById("auto-add-options");
const thresholdInput = document.getElementById("threshold"); const thresholdInput = document.getElementById("threshold");
const saveOptionsBtn = document.getElementById("save-options"); const saveOptionsBtn = document.getElementById("save-options");
const openStats = document.getElementById("open-stats");
if (autoAddContainer) { if (autoAddContainer) {
autoAddContainer.style.display = isLoggedIn ? "block" : "none"; autoAddContainer.style.display = isLoggedIn ? "block" : "none";
...@@ -89,6 +90,11 @@ async function updateOptionsUI() { ...@@ -89,6 +90,11 @@ async function updateOptionsUI() {
]) || { isTrackingActive: false }; ]) || { isTrackingActive: false };
if (toggleStatsBtn) { if (toggleStatsBtn) {
if (!isLoggedIn) {
openStats.style.display = "none";
} else {
openStats.style.display = "block";
}
if (!accessToken) { if (!accessToken) {
toggleStatsBtn.textContent = "Activer les statistiques"; toggleStatsBtn.textContent = "Activer les statistiques";
toggleStatsBtn.style.opacity = "0.5"; toggleStatsBtn.style.opacity = "0.5";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment