From c8835326573a774133bafdc9ac3c144023cf901f Mon Sep 17 00:00:00 2001 From: JohnBaumb <80135794+JohnBaumb@users.noreply.github.com> Date: Mon, 27 Apr 2026 14:51:57 -0700 Subject: [PATCH] fix: discover sync toast shows track count, link to downloads, and download intent --- webui/static/discover.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/webui/static/discover.js b/webui/static/discover.js index 4aae4d91..376c14f8 100644 --- a/webui/static/discover.js +++ b/webui/static/discover.js @@ -9295,7 +9295,18 @@ async function _doSyncDiscoverPlaylist(playlistType, playlistName) { const result = await batchResponse.json(); if (result.success) { - showToast(`${playlistName}: syncing ${syncTracks.length} tracks to library...`, 'info'); + // Custom toast with clickable link to Downloads page + const _toastMsg = `${playlistName}: analyzing ${syncTracks.length} tracks...`; + const _toastContainer = document.getElementById('toast-container'); + if (_toastContainer) { + const _t = document.createElement('div'); + _t.className = 'toast-compact toast-info'; + _t.innerHTML = `${_toastMsg} View progress — missing tracks will be downloaded.`; + _t.onclick = () => { _t.classList.add('toast-exit'); setTimeout(() => { if (_toastContainer.contains(_t)) _toastContainer.removeChild(_t); }, 200); }; + _toastContainer.appendChild(_t); + requestAnimationFrame(() => _t.classList.add('toast-enter')); + setTimeout(() => { if (_toastContainer.contains(_t)) { _t.classList.add('toast-exit'); setTimeout(() => { if (_toastContainer.contains(_t)) _toastContainer.removeChild(_t); }, 300); } }, 6000); + } const card = document.getElementById(`discover-sync-card-${playlistType}`); if (card) { const statusEl = card.querySelector('.discover-sync-status');