diff --git a/webui/static/script.js b/webui/static/script.js
index 112fb597..805509d7 100644
--- a/webui/static/script.js
+++ b/webui/static/script.js
@@ -1449,8 +1449,8 @@ function renderSpotifyPlaylists() {
-
-
@@ -1460,34 +1460,28 @@ function renderSpotifyPlaylists() {
}).join('');
}
-function handleCardActionClick(event, playlistId) {
- event.stopPropagation();
+function handleViewProgressClick(event, playlistId) {
+ event.stopPropagation(); // Prevent the card selection from toggling
const process = activeDownloadProcesses[playlistId];
if (process && process.modalElement) {
- // If a process is active, show its modal
+ // If a process is active, just show its modal
console.log(`Re-opening active download modal for playlist ${playlistId}`);
process.modalElement.style.display = 'flex';
- } else {
- // Otherwise, open the details modal as normal
- openPlaylistDetailsModal(event, playlistId);
}
}
function updatePlaylistCardUI(playlistId) {
const process = activeDownloadProcesses[playlistId];
- const defaultBtn = document.getElementById(`action-btn-${playlistId}`);
const progressBtn = document.getElementById(`progress-btn-${playlistId}`);
- if (!defaultBtn || !progressBtn) return;
+ if (!progressBtn) return;
if (process && process.status === 'running') {
- // A process is running: show progress button, hide default
- defaultBtn.classList.add('hidden');
+ // A process is running: show the progress button
progressBtn.classList.remove('hidden');
} else {
- // No process or it's finished: show default, hide progress
- defaultBtn.classList.remove('hidden');
+ // No process or it's finished: hide the progress button
progressBtn.classList.add('hidden');
}
}
@@ -3539,6 +3533,8 @@ window.closeDownloadMissingModal = closeDownloadMissingModal;
window.startTrackAnalysis = startTrackAnalysis;
window.cancelAllOperations = cancelAllOperations;
window.cancelTrackDownload = cancelTrackDownload;
+window.handleViewProgressClick = handleViewProgressClick;
+
// APPEND THIS JAVASCRIPT SNIPPET (B)
diff --git a/webui/static/style.css b/webui/static/style.css
index 5c1854e7..d445208d 100644
--- a/webui/static/style.css
+++ b/webui/static/style.css
@@ -4964,6 +4964,11 @@ body {
transition: all 0.2s ease;
}
+.playlist-card-actions .view-progress-btn {
+ background: #1db954;
+ color: #000000;
+}
+
.playlist-card-actions button:hover {
background: #1db954;
color: #000000;