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:
@@ -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) {
|
||||||
|
|||||||
Fai riferimento in un nuovo problema
Block a user