fix(admin): bulk delete swaps the episode list — Play → Download without reload

The bulk 'Delete selected files' button posted with hx-swap='none',
which makes htmx DISCARD the response — and the response is the
refreshed episode list partial. Rows (Play → Download, badges) stayed
stale until a manual refresh. Target the swap at #episode-list /
outerHTML like the Download All button; the afterSwap listeners then
reapply the (now-empty) selection and any active filter.
This commit is contained in:
John O'Keefe committed 2026-10-30 14:13:39 -04:00
1 parent 7d5bbd1177
commit 5fee8bfb4a
2 files changed
+33 -32

No files matched your search

+2 -1
View File
@@ -256,8 +256,9 @@ templ PodcastDetailPage(user User, data PodcastDetailData) {
class="btn btn-secondary text-xs"
:class="bulkSelectionClass()"
hx-post={ "/api/podcasts/feeds/" + data.Feed.ID + "/episodes/delete-files" }
hx-target="#episode-list"
hx-swap="outerHTML"
hx-include="input[name='episode-file-select']:checked"
hx-swap="none"
hx-confirm="Delete the selected episode files? Rows reset to pending (a feed refresh will not re-materialize them); episodes re-download on demand."
style="color: var(--status-warning, #d97706);"
>