diff --git a/css/style.css b/css/style.css index 5043f915..16db3141 100644 --- a/css/style.css +++ b/css/style.css @@ -20,7 +20,7 @@ body { width: 5rem; height: 5rem; border-width: .8rem; - color: #212529; + color: #520000; } @font-face { diff --git a/js/ui.js b/js/ui.js index 2d6b7f61..edb301b9 100644 --- a/js/ui.js +++ b/js/ui.js @@ -1029,7 +1029,6 @@ exploreLink.addEventListener('click', async () => { showElement(['exploreWrapper', 'spectrogramWrapper'], false); enableMenuItem(['saveCSV']); adjustSpecDims(true) - showLoadingSpinner(); worker.postMessage({ action: 'filter', species: undefined, range: STATE.explore.range, explore: true }); // re-prepare }); @@ -1551,6 +1550,9 @@ const setUpWorkerMessaging = () => { case 'seen-species-list': generateBirdList('seenSpecies', args.list); break; + case 'show-spinner': + showLoadingSpinner(); + break; case 'spawning': displayWarmUpMessage(); break; diff --git a/js/worker.js b/js/worker.js index c2004c89..46644332 100644 --- a/js/worker.js +++ b/js/worker.js @@ -268,9 +268,10 @@ async function handleMessage(e) { case 'filter': if (STATE.db) { t0 = Date.now() + UI.postMessage({event: 'show-spinner'}); await Promise.all([getSummary(args), getResults(args)]); - UI.postMessage({event: 'hide-spinner'}); if (DEBUG) console.log('Filter took ', (Date.now() - t0) / 1000, 'seconds') + } break; case 'get-detected-species-list': @@ -333,6 +334,7 @@ async function handleMessage(e) { await onUpdateFileStart(args) break; case 'update-list': + UI.postMessage({event: 'show-spinner'}); SEEN_LIST_UPDATE = false; predictWorkers.forEach(worker => worker.postMessage({ message: 'list', list: args.list })) @@ -2175,7 +2177,7 @@ const getResults = async ({ } } } - + UI.postMessage({event: 'hide-spinner'}); }; // Function to format the CSV export