feat: crimescene subcollections auto-collapsed by default

This commit is contained in:
jae 2026-04-17 18:40:06 +00:00
parent cffadb2298
commit a02e4eaadd
2 changed files with 7 additions and 5 deletions

View file

@ -1111,14 +1111,16 @@ mark.ur-highlight {
} }
.prop-subcollection-toggle { .prop-subcollection-toggle {
font-size: 1rem; font-size: 0.75rem;
color: #ff2d2d; color: #ff2d2d;
transition: transform 0.25s; transition: transform 0.25s;
display: inline-block; display: inline-block;
width: 1rem;
flex-shrink: 0;
} }
.prop-subcollection.collapsed .prop-subcollection-toggle { .prop-subcollection:not(.collapsed) .prop-subcollection-toggle {
transform: rotate(-90deg); transform: rotate(90deg);
} }
.prop-subcollection.collapsed .prop-doc-list, .prop-subcollection.collapsed .prop-doc-list,

View file

@ -317,9 +317,9 @@
html += `<div class="prop-section-label">SUB-COLLECTIONS [${col.subcollections.length}]</div>`; html += `<div class="prop-section-label">SUB-COLLECTIONS [${col.subcollections.length}]</div>`;
col.subcollections.forEach(sc => { col.subcollections.forEach(sc => {
const nScDocs = sc.documents ? sc.documents.length : 0; const nScDocs = sc.documents ? sc.documents.length : 0;
html += `<div class="prop-subcollection">`; html += `<div class="prop-subcollection collapsed">`;
html += `<div class="prop-subcollection-header" onclick="this.parentElement.classList.toggle('collapsed')">`; html += `<div class="prop-subcollection-header" onclick="this.parentElement.classList.toggle('collapsed')">`;
html += `<span class="prop-subcollection-toggle"></span>`; html += `<span class="prop-subcollection-toggle"></span>`;
html += `<span class="prop-subcollection-name">${esc(sc.name)}</span>`; html += `<span class="prop-subcollection-name">${esc(sc.name)}</span>`;
html += `<span class="prop-subcollection-count">[${nScDocs} DOC${nScDocs === 1 ? '' : 'S'}]</span>`; html += `<span class="prop-subcollection-count">[${nScDocs} DOC${nScDocs === 1 ? '' : 'S'}]</span>`;
html += `</div>`; html += `</div>`;