zakladka ustawien

This commit is contained in:
Mateusz Gruszczyński
2025-10-21 11:57:53 +02:00
parent 2c246ac40a
commit a363fb9ef8
3 changed files with 19 additions and 14 deletions

View File

@@ -31,10 +31,16 @@
if (barEff) barEff.style.backgroundColor = effHex;
if (hexEffEl) hexEffEl.textContent = effHex;
if (!raw) ensureHiddenClear(input); else removeHiddenClear(input);
if (!raw) {
ensureHiddenClear(input);
input.disabled = true;
} else {
removeHiddenClear(input);
input.disabled = false;
}
}
form.querySelectorAll(".reset-one").forEach(btn => {
form.querySelectorAll(".use-default").forEach(btn => {
btn.addEventListener("click", () => {
const name = btn.getAttribute("data-target");
const input = form.querySelector(`input[name="${name}"]`);
@@ -43,6 +49,7 @@
updatePreview(input);
});
});
resetAllBtn?.addEventListener("click", () => {
form.querySelectorAll('input[type="color"].category-color').forEach(input => {
input.value = "";