Keep mapping collapsed on reload
This commit is contained in:
+2
-2
@@ -411,7 +411,7 @@ function renderMappingSources(data) {
|
||||
if (!data.mapped || !items.length) {
|
||||
setMappingStatus(data.message || "Mapping missing", "is-missing");
|
||||
mappingList.replaceChildren();
|
||||
mappingDetails.open = true;
|
||||
mappingDetails.open = false;
|
||||
return;
|
||||
}
|
||||
const enabledCount = items.filter((item) => item.enabled).length;
|
||||
@@ -422,7 +422,7 @@ function renderMappingSources(data) {
|
||||
? `Sources OK ✓ (${testedCount}/${enabledCount})`
|
||||
: data.message || `Sources problem (${testedCount}/${enabledCount})`;
|
||||
setMappingStatus(statusText, ready ? "is-ready" : testedCount > 0 ? "is-warning" : "is-missing");
|
||||
mappingDetails.open = !ready || failedCount > 0;
|
||||
mappingDetails.open = false;
|
||||
mappingList.replaceChildren(...items.map((item) => {
|
||||
const row = document.createElement("div");
|
||||
row.className = `mapping-source-row${item.enabled ? "" : " is-disabled"}`;
|
||||
|
||||
Reference in New Issue
Block a user