file manager: blue filter button when a filter is active

A non-'All' selection turns the collapsed filter button blue (like the
active sort pill) so it stands out; 'All' keeps the default style.
Frontend 1161 tests green.
This commit is contained in:
catarrh committed 2026-10-26 14:53:36 +03:00
1 parent 8fdf1ddff9
commit cc7c23a9c7
2 files changed
+36 -1

No files matched your search

+11 -1
View File
@@ -16296,7 +16296,17 @@ function pysimFsFilterRender() {
}
menu.innerHTML = out;
}
if (btn) btn.textContent = pysimFsFilterSummary();
if (btn) {
btn.textContent = pysimFsFilterSummary();
// a non-"All" selection stands out (blue, like the active sort pill)
const active = pysimFsFilter.size > 0 && !pysimFsFilter.has(FS_FILTER_ALL);
btn.classList.toggle('bg-blue-600', active);
btn.classList.toggle('text-white', active);
btn.classList.toggle('text-gray-700', !active);
btn.classList.toggle('dark:text-slate-300', !active);
btn.classList.toggle('hover:bg-gray-200', !active);
btn.classList.toggle('dark:hover:bg-slate-700', !active);
}
}
// Expand or collapse the menu (`force` overrides the toggle; the outside