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
والد c1b9a5018d
کامیت 05ff5fccdb
@@ -969,7 +969,7 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
</div>
</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>
</section>
@@ -2075,9 +2075,7 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
banner.classList.toggle("visible", showWarning && !isStatsPage);
}
if (inlineWarning) {
inlineWarning.textContent = showWarning
? "MQTT IATA is unset. Set it before enabling MeshCoreTel or LetsMesh brokers."
: "";
inlineWarning.style.display = showWarning ? "" : "none";
}
}
function queueCommand(task) {