show if users have webcams and make sorting options better for windows and webcam. Also make webcam settings sticky.

This commit is contained in:
KingKDot
2026-06-12 10:20:02 -05:00
parent b6672ee375
commit cc0e6f737b
15 changed files with 373 additions and 25 deletions
+7 -1
View File
@@ -120,6 +120,7 @@ function clientQueryParams(page = state.page) {
os: state.filterOs || "all",
country: state.filterCountry || "all",
group: state.filterGroup || "all",
webcam: state.filterWebcam || "all",
});
}
@@ -222,6 +223,11 @@ function updateOsFilter(items) {
allOption.textContent = "All OS";
osSelect.appendChild(allOption);
const windowsOption = document.createElement("option");
windowsOption.value = "windows";
windowsOption.textContent = "Windows";
osSelect.appendChild(windowsOption);
osArray.forEach((os) => {
const option = document.createElement("option");
option.value = os;
@@ -229,7 +235,7 @@ function updateOsFilter(items) {
osSelect.appendChild(option);
});
if (currentValue !== "all" && osList.has(currentValue)) {
if (currentValue === "windows" || (currentValue !== "all" && osList.has(currentValue))) {
osSelect.value = currentValue;
}
}