zakladka ustawien

This commit is contained in:
Mateusz Gruszczyński
2025-10-21 11:32:04 +02:00
parent cabc2c6a4a
commit 43b7b93ffa
3 changed files with 54 additions and 44 deletions

View File

@@ -17,7 +17,6 @@
if (hidden) hidden.remove();
}
// Podgląd: bary pod pickerem (Efektywny = override || auto)
function updatePreview(input) {
const card = input.closest(".col-12, .col-md-6, .col-lg-4");
const hexAutoEl = card.querySelector(".hex-auto");
@@ -35,7 +34,6 @@
if (!raw) ensureHiddenClear(input); else removeHiddenClear(input);
}
// Reset jednego / wszystkich
form.querySelectorAll(".reset-one").forEach(btn => {
btn.addEventListener("click", () => {
const name = btn.getAttribute("data-target");
@@ -52,14 +50,12 @@
});
});
// Init + live dla pickerów
form.querySelectorAll('input[type="color"].category-color').forEach(input => {
updatePreview(input);
input.addEventListener("input", () => updatePreview(input));
input.addEventListener("change", () => updatePreview(input));
});
// Live etykiety dla czułości OCR
(function () {
const slider = document.getElementById("ocr_sensitivity");
const badge = document.getElementById("ocr_sens_badge");