Clean up cleanup dialog

- Remove duplicate 'Téléversements abandonnés' heading already communicated by the summary
- Replace #peertube-orphans-wrapper with display:contents wrapper so PeerTube details sit as direct grid siblings
- Add hx-confirm to all delete buttons (filepond, trash, PeerTube orphans)
This commit is contained in:
Pontoporeia
2026-06-21 17:52:30 +02:00
parent dfde88eaa5
commit 6aee5ec131
4 changed files with 12 additions and 13 deletions

View File

@@ -41,7 +41,7 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
<?php endif; ?>
<?php if ($tmpTotalCount > 0): ?>
<button type="button" class="btn btn--sm btn--secondary" id="tmp-cleanup-btn"
onclick="document.getElementById('tmp-cleanup-dialog').showModal(); htmx.trigger('#tmp-cleanup-stats-wrapper','loadStats'); htmx.trigger('#peertube-orphans-wrapper','loadPeertube')">
onclick="document.getElementById('tmp-cleanup-dialog').showModal(); htmx.trigger('#tmp-cleanup-stats-wrapper','loadStats'); htmx.trigger('#peertube-orphans-fragment','loadPeertube')">
<?= icon('trash') ?> Nettoyer (<?= $tmpTotalCount ?>)
</button>
<?php endif; ?>

View File

@@ -22,11 +22,11 @@
</details>
</div>
<!-- ═══════ PeerTube ═══════ -->
<div id="peertube-orphans-wrapper"
<div id="peertube-orphans-fragment" style="display:contents"
hx-get="/admin/actions/peertube-orphans-fragment.php"
hx-trigger="loadPeertube"
hx-swap="outerHTML"
hx-indicator="#peertube-orphans-wrapper">
hx-indicator="#peertube-orphans-fragment">
<p style="margin:0;color:var(--text-secondary)">Chargement…</p>
</div>
</div>