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