v0.43.0
This commit is contained in:
1 parent
9a6c21fa04
commit
5b6d4a7903
41 files changed
+3299
-677
No files matched your search
@@ -173,6 +173,14 @@
|
||||
if (!enabled.checked) badges.push([t("vhDisabled"), "danger"]);
|
||||
headBadges.replaceChildren(...badges.map(([text, cls]) => el("span", text, `pill ${cls}`.trim())));
|
||||
};
|
||||
// Two sections like the other editors: identity/addresses and protocols.
|
||||
const listenerSection = (key, cls) => { const box = el("section", undefined, `location-card listener-section ${cls}`), heading = el("h4", undefined, "location-card-title"), sectionGrid = el("div", undefined, "vh-grid"); heading.append(label("span", key)); box.append(heading, sectionGrid); return [box, sectionGrid]; };
|
||||
const [identityBox, identityGrid] = listenerSection("listenerSectionIdentity", "listener-identity"), [protocolBox, protocolGrid] = listenerSection("listenerSectionProtocols", "listener-protocols");
|
||||
identityGrid.append(...[id, name, scope].map(control => control.closest("label")), grid.querySelector(".host-chip-field"));
|
||||
protocolGrid.append(...[enabled, tls, h2, h2c, h3].map(control => control.closest("label")));
|
||||
identityGrid.append(...grid.children);
|
||||
protocolBox.append(protocolActions);
|
||||
const listenerSections = el("div", undefined, "location-cards listener-sections"); listenerSections.append(identityBox, protocolBox); grid.replaceWith(listenerSections);
|
||||
for (const input of [tls, h2, h2c, h3]) input.addEventListener("change", sync);
|
||||
for (const type of ["input", "change", "keyup"]) row.addEventListener(type, syncHead); body.addEventListener("click", () => setTimeout(syncHead));
|
||||
sync();
|
||||
|
||||
Reference in new issue
Block a user