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.
这个提交包含在:
@@ -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) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户