From 410151db521961d6a0f2b6bf31a222503ebda289 Mon Sep 17 00:00:00 2001 From: Mattk70 Date: Tue, 20 Feb 2024 10:34:34 +0000 Subject: [PATCH] fixed included bug --- index.html | 2 +- js/ui.js | 6 ++---- js/worker.js | 4 +++- package.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 4e281bbd..c53ec6ec 100644 --- a/index.html +++ b/index.html @@ -423,7 +423,7 @@
Saved Records
Enable analysis completion notifications - ? + ? diff --git a/js/ui.js b/js/ui.js index 212a1e6d..aca0160d 100644 --- a/js/ui.js +++ b/js/ui.js @@ -4659,15 +4659,13 @@ function track(event, action, name, value){ if (Notification.permission === "granted") { // Check whether notification permissions have already been granted; // if so, create a notification - const notification = new Notification(`Analysis completed in ${duration.toFixed(0)} seconds`, {requireInteraction: true}); - // … + const notification = new Notification(`Analysis completed in ${duration.toFixed(0)} seconds`, {requireInteraction: true, icon: 'img/icon/chirpity_logo2.png'}); } else if (Notification.permission !== "denied") { // We need to ask the user for permission Notification.requestPermission().then((permission) => { // If the user accepts, let's create a notification if (permission === "granted") { - const notification = new Notification(`Analysis completed in ${duration.toFixed(0)} seconds`, {requireInteraction: true}); - // … + const notification = new Notification(`Analysis completed in ${duration.toFixed(0)} seconds`, {requireInteraction: true, icon: 'img/icon/chirpity_logo2.png'}); } }); } else { diff --git a/js/worker.js b/js/worker.js index 3cfa507f..b823d5e8 100644 --- a/js/worker.js +++ b/js/worker.js @@ -2310,7 +2310,7 @@ const prepSummaryStatement = (included) => { if (filtersApplied(included)){ const included = await getIncludedIDs(); positionStmt += ` AND speciesID IN (${prepParams(included)}) `; - params.push(...STATE.included) + params.push(...included) } if (STATE.locationID) { positionStmt += ` AND locationID = ${STATE.locationID} `; @@ -2361,6 +2361,8 @@ const prepSummaryStatement = (included) => { if (select) { const position = await getPosition({species: species, dateTime: select.dateTime, included: included}); offset = Math.floor(position/limit) * limit; + // update the pagination + await getTotal({species: species, offset: offset, included: included}) } offset = offset ?? (species ? (STATE.filteredOffset[species] ?? 0) : STATE.globalOffset); if (species) STATE.filteredOffset[species] = offset; diff --git a/package.json b/package.json index 32de4648..5c928885 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "electron .", "minify": "node minify.js", - "export": "electron-builder build --m", + "export": "electron-builder build --win --x64", "publish": "electron-builder --win --x64 -p always" }, "repository": {