diff --git a/meshview/templates/nodelist.html b/meshview/templates/nodelist.html index aeadc14..1f1893e 100644 --- a/meshview/templates/nodelist.html +++ b/meshview/templates/nodelist.html @@ -57,7 +57,7 @@ - @@ -412,11 +412,14 @@ document.addEventListener("DOMContentLoaded", async function() { } function toggleFavoritesFilter() { - showOnlyFavorites = !showOnlyFavorites; - favoritesBtn.textContent = showOnlyFavorites - ? "Show All" - : "⭐ Show Favorites"; - favoritesBtn.classList.toggle("active", showOnlyFavorites); + if (showOnlyFavorites) { + clearFilters(); + return; + } + showOnlyFavorites = true; + favoritesBtn.textContent = "Show All"; + favoritesBtn.classList.add("active"); + favoritesBtn.setAttribute("aria-pressed", "true"); applyFilters(); } @@ -565,8 +568,9 @@ document.addEventListener("DOMContentLoaded", async function() { sortAsc = true; showOnlyFavorites = false; - favoritesBtn.textContent = "⭐ Show Favorites"; + favoritesBtn.textContent = nodelistTranslations.show_favorites || "⭐ Show Favorites"; favoritesBtn.classList.remove("active"); + favoritesBtn.setAttribute("aria-pressed", "false"); applyFilters(); updateSortIcons();