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

@@ -61,10 +61,6 @@ if ($totalStale === 0 && $totalFiles === 0): ?>
</summary>
<?php if ($fpStale > 0): ?>
<p class="n-heading">
<?= icon('paint-brush-household') ?>
Téléversements abandonnés
</p>
<table class="n-table">
<thead><tr><th>Nom</th><th>Taille</th><th>Âge</th><th width="1%"></th></tr></thead>
<tbody>
@@ -76,6 +72,7 @@ if ($totalStale === 0 && $totalFiles === 0): ?>
<td style="white-space:nowrap">
<button type="button" class="btn btn--sm btn--danger" style="font-size:0.85em;padding:2px var(--space-xs)"
hx-post="/admin/actions/cleanup-tmp.php"
hx-confirm="Supprimer définitivement ce téléversement abandonné ?"
hx-vals='{"csrf_token":"<?= htmlspecialchars($_SESSION['csrf_token']) ?>","filepond_dir":"<?= htmlspecialchars($f['name']) ?>"}'
hx-target="#tmp-cleanup-stats-wrapper"
hx-swap="outerHTML"
@@ -106,6 +103,7 @@ if ($totalStale === 0 && $totalFiles === 0): ?>
<td style="white-space:nowrap">
<button type="button" class="btn btn--sm btn--danger" style="font-size:0.85em;padding:2px var(--space-xs)"
hx-post="/admin/actions/cleanup-tmp.php"
hx-confirm="Supprimer définitivement ce fichier de la corbeille ?"
hx-vals='{"csrf_token":"<?= htmlspecialchars($_SESSION['csrf_token']) ?>","trash_file":"<?= htmlspecialchars($f['name']) ?>"}'
hx-target="#tmp-cleanup-stats-wrapper"
hx-swap="outerHTML"