Use SoulSync confirm dialog for batch cancel instead of browser alert

This commit is contained in:
Broque Thomas 2026-04-17 12:29:50 -07:00
parent 04b8c02ea9
commit 8f7a3b4861

View file

@ -75773,7 +75773,15 @@ function _adlFilterByBatch(batchId) {
}
async function _adlCancelBatch(batchId) {
if (!confirm('Cancel this batch? Active downloads will be stopped.')) return;
const batch = _adlBatches.find(b => b.batch_id === batchId);
const batchName = batch ? batch.batch_name : 'this batch';
const confirmed = await showConfirmDialog({
title: 'Cancel Batch',
message: `Cancel "${batchName}"? All active and queued downloads in this batch will be stopped.`,
confirmText: 'Cancel Batch',
destructive: true
});
if (!confirmed) return;
try {
const resp = await fetch(`/api/playlists/${batchId}/cancel_batch`, { method: 'POST' });
const data = await resp.json();