Hide mqttBrokerWarning with display:none to remove surplus space

The .panel-warning class carries min-height:1.4em, so clearing its
textContent left an empty element at the bottom of the MQTT Settings
section.

Move the warning string into the HTML as static content and switch
refreshMqttIataWarning() to toggle style.display instead of textContent.
When no warning is needed the element is removed from layout entirely,
eliminating the extra vertical gap.
This commit is contained in:
Valentin V. Bartenev
2026-05-09 18:02:37 +03:00
parent c1b9a5018d
commit 05ff5fccdb
+2 -4
Vedi File
@@ -969,7 +969,7 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
</div> </div>
</div> </div>
<div class="panel-note">Only two brokers can be enabled at the same time.</div> <div class="panel-note">Only two brokers can be enabled at the same time.</div>
<div id="mqttBrokerWarning" class="panel-warning"></div> <div id="mqttBrokerWarning" class="panel-warning">MQTT IATA is unset. Set it before enabling MeshCoreTel or LetsMesh brokers.</div>
</div> </div>
</div> </div>
</section> </section>
@@ -2075,9 +2075,7 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
banner.classList.toggle("visible", showWarning && !isStatsPage); banner.classList.toggle("visible", showWarning && !isStatsPage);
} }
if (inlineWarning) { if (inlineWarning) {
inlineWarning.textContent = showWarning inlineWarning.style.display = showWarning ? "" : "none";
? "MQTT IATA is unset. Set it before enabling MeshCoreTel or LetsMesh brokers."
: "";
} }
} }
function queueCommand(task) { function queueCommand(task) {