From fb59c2383929bb7912e9fb65312e75199d27aac0 Mon Sep 17 00:00:00 2001 From: olcxja Date: Sun, 25 Oct 2026 20:42:19 +0100 Subject: [PATCH] app folder expandable in deletion screen --- renderer/app.js | 9 +++++++++ renderer/style.css | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/renderer/app.js b/renderer/app.js index 78d5de9..d1d35c1 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -2419,6 +2419,7 @@ function renderReview(info) { row.innerHTML = ` + ` row.querySelector('.lan-review-name').textContent = unit.label || unit.key row.querySelector('input').onchange = async event => { @@ -2435,9 +2436,17 @@ function renderReview(info) { const children = document.createElement('div') children.className = 'lan-nodes' list.appendChild(children) + // a whole unit folds away like any folder: only the list scrolls, not the modal + const fold = row.querySelector('.lan-unit-open') + fold.onclick = () => { + children.hidden = !children.hidden + fold.textContent = children.hidden ? '+' : '−' + } // top folders load on first paint; a unit's list is small (collapsed rows) window.plwl.lansyncReviewTree(info.id, unit.key).then(res => { for (const node of (res && res.nodes) || []) children.appendChild(nodeRow(node, unit.key, 1)) + // nothing to fold under a unit whose row is only a registry entry + fold.hidden = !children.children.length refresh() }) } diff --git a/renderer/style.css b/renderer/style.css index 0d8dbee..810c44d 100644 --- a/renderer/style.css +++ b/renderer/style.css @@ -254,7 +254,9 @@ content { .lan-node .check-label { flex: 1; min-width: 0; margin: 0; gap: 0.5rem; } .lan-node .lan-node-name { overflow-wrap: anywhere; } .lan-node input[type='checkbox'] { width: 1.4rem; height: 1.4rem; } -.lan-node-open { padding: 0 0.5rem; min-height: 1.6rem; } +.lan-node-open, .lan-unit-open { padding: 0 0.5rem; min-height: 1.6rem; } +/* .button's own display would otherwise win over the hidden attribute */ +.lan-node-open[hidden], .lan-unit-open[hidden] { display: none; } .lan-review-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.6rem; } .button {