Adds a server-rendered collapsible file tree section to the overlay detail page so users can verify what their script/workshop overlays produced and pull individual artifacts (VPKs, configs) without SSH. HTMX-driven lazy folder expansion with click-to-download via send_file; symlinks land anywhere under LEFT4ME_ROOT (so workshop addons stream from the shared cache) but escapes are refused. Same access rule as the rest of the page (admin or owner). 39 new tests; full web suite green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
977 B
HTML
25 lines
977 B
HTML
{% if entry.kind == 'dir' %}
|
||
<li class="file-tree-row file-tree-row-dir">
|
||
<button type="button"
|
||
class="file-tree-toggle"
|
||
aria-expanded="false"
|
||
hx-get="/overlays/{{ overlay.id }}/files?path={{ entry.rel|urlencode }}"
|
||
hx-target="next .file-tree-children"
|
||
hx-swap="innerHTML"
|
||
hx-trigger="click once">
|
||
<span class="chevron" aria-hidden="true">›</span>{{ entry.name }}/
|
||
</button>
|
||
<div class="file-tree-children" hidden></div>
|
||
</li>
|
||
{% else %}
|
||
<li class="file-tree-row file-tree-row-file">
|
||
{% if entry.broken %}
|
||
<span>{{ entry.name }}</span>
|
||
<span class="file-tree-badge file-tree-badge-warn">broken link</span>
|
||
{% else %}
|
||
<a href="/overlays/{{ overlay.id }}/files/download?path={{ entry.rel|urlencode }}">{{ entry.name }}</a>
|
||
{% if entry.is_symlink %}<span class="file-tree-badge">link</span>{% endif %}
|
||
<span class="muted">{{ entry.size_human }}</span>
|
||
{% endif %}
|
||
</li>
|
||
{% endif %}
|