From b447e332cbae9c0acceed048ec5b8921da322395 Mon Sep 17 00:00:00 2001 From: iscarelli Date: Wed, 10 Jun 2026 01:53:06 -0300 Subject: [PATCH] fix(spools): ocultar campo tara personalizada ao selecionar modelo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Campo e rótulo ficavam visíveis mas desabilitados, tornando difícil perceber que estavam inativos. Agora são ocultados completamente via display:none quando um modelo de carretel está selecionado, e voltam ao selecionar "Tara personalizada / desconhecida". Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- templates/spools/form.html | 16 ++++++---------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc277c0..98ad79e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Versioning follows [SemVer](https://semver.org/): **MAJOR.MINOR.PATCH** --- +## [1.33.1] — 2026-06-10 + +### Fixed +- **Campo Tara Personalizada some quando modelo de carretel está selecionado.** Antes o campo ficava visível mas desabilitado (difícil de perceber). Agora o campo e seu rótulo são ocultados completamente; voltam a aparecer ao selecionar "Tara personalizada / desconhecida". + ## [1.33.0] — 2026-06-10 ### Added diff --git a/VERSION b/VERSION index 7aa332e..02261be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.33.0 +1.33.1 diff --git a/templates/spools/form.html b/templates/spools/form.html index ea96ef9..0d161bf 100644 --- a/templates/spools/form.html +++ b/templates/spools/form.html @@ -48,12 +48,11 @@

{% if spool %}{{ _('Editar') }} SP-{{ '%04d'|format(spo {% endfor %} -
+
-
@@ -123,20 +122,17 @@

{% if spool %}{{ _('Editar') }} SP-{{ '%04d'|format(spo filamentSel.addEventListener('change', updateFilamentPreview); updateFilamentPreview(); -// Tara — habilita/desabilita campo personalizado conforme modelo selecionado +// Tara — esconde/mostra campo personalizado conforme modelo selecionado const sel = document.getElementById('spoolModelSelect'); const customTare = document.getElementById('customTare'); -const hint = document.getElementById('tareHint'); +const customTareCol = document.getElementById('customTareCol'); function updateTareState() { const opt = sel.options[sel.selectedIndex]; - const tare = opt.dataset.tare; - if (tare) { - customTare.disabled = true; + if (opt.dataset.tare) { + customTareCol.style.display = 'none'; customTare.value = ''; - hint.textContent = "{{ _('Tara do modelo') }}: " + parseFloat(tare).toFixed(0) + 'g'; } else { - customTare.disabled = false; - hint.textContent = ''; + customTareCol.style.display = ''; } } sel.addEventListener('change', updateTareState);