From 57f86ef85dc9d4e1398c9963c0c3e9e25833e4fc Mon Sep 17 00:00:00 2001 From: "Louise Cerdeira, PhD" Date: Thu, 30 Nov 2023 01:41:17 +0000 Subject: [PATCH 1/3] Update constants.js --- client/src/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/constants.js b/client/src/constants.js index 138fd8a9..26f3aad5 100644 --- a/client/src/constants.js +++ b/client/src/constants.js @@ -1,3 +1,3 @@ // Static routes to run the app. Only use one: local or heroku. //export const API_ENDPOINT = 'http://localhost:8080/api/'; -export const API_ENDPOINT = 'https://typhinet.herokuapp.com/api/'; +export const API_ENDPOINT = 'https://typhinetdev.herokuapp.com/api/'; From 00c63c44764ec88fac7669437772b275617324a9 Mon Sep 17 00:00:00 2001 From: vlshtm Date: Thu, 15 Feb 2024 17:31:16 +0000 Subject: [PATCH 2/3] update serviceWorker --- client/src/registerServiceWorker.js | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/client/src/registerServiceWorker.js b/client/src/registerServiceWorker.js index d2754a12..5255669c 100644 --- a/client/src/registerServiceWorker.js +++ b/client/src/registerServiceWorker.js @@ -8,38 +8,38 @@ // To learn more about the benefits of this model, read https://goo.gl/KwvDNy. // This link also includes instructions on opting out of this behavior. -const isLocalhost = Boolean( - window.location.hostname === "localhost" || - // [::1] is the IPv6 localhost address. - window.location.hostname === "[::1]" || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); +// const isLocalhost = Boolean( +// window.location.hostname === "localhost" || +// // [::1] is the IPv6 localhost address. +// window.location.hostname === "[::1]" || +// // 127.0.0.1/8 is considered localhost for IPv4. +// window.location.hostname.match( +// /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ +// ) +// ); export default function register() { - if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { + if (!process.env.PUBLIC_URL && process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { // The URL constructor is available in all browsers that support SW. - const publicUrl = new URL(process.env.PUBLIC_URL, window.location); - if (publicUrl.origin !== window.location.origin) { - // Our service worker won't work if PUBLIC_URL is on a different origin - // from what our page is served on. This might happen if a CDN is used to - // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 - return; - } + // const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + // if (publicUrl.origin !== window.location.origin) { + // // Our service worker won't work if PUBLIC_URL is on a different origin + // // from what our page is served on. This might happen if a CDN is used to + // // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + // return; + // } - window.addEventListener("load", () => { - const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + // window.addEventListener("load", () => { + // const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; - if (!isLocalhost) { - // Is not local host. Just register service worker - registerValidSW(swUrl); - } else { - // This is running on localhost. Lets check if a service worker still exists or not. - checkValidServiceWorker(swUrl); - } - }); + // if (!isLocalhost) { + // // Is not local host. Just register service worker + // registerValidSW(swUrl); + // } else { + // // This is running on localhost. Lets check if a service worker still exists or not. + // checkValidServiceWorker(swUrl); + // } + // }); } } From 55df6472919e55e5c0a310f0e0e4cecb291a9443 Mon Sep 17 00:00:00 2001 From: vlshtm Date: Thu, 15 Feb 2024 17:32:49 +0000 Subject: [PATCH 3/3] update file size --- client/src/components/Elements/DownloadData/DownloadData.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/Elements/DownloadData/DownloadData.js b/client/src/components/Elements/DownloadData/DownloadData.js index 089a0438..a1d33995 100644 --- a/client/src/components/Elements/DownloadData/DownloadData.js +++ b/client/src/components/Elements/DownloadData/DownloadData.js @@ -387,9 +387,9 @@ export const DownloadData = () => { graphImg.src = await domtoimage.toPng(document.getElementById(graphCards[index].id), { bgcolor: 'white' }); await graphImgPromise; if (graphImg.width <= 741) { - doc.addImage(graphImg, 'PNG', 16, 110, undefined,'FAST'); + doc.addImage(graphImg, 'PNG', 16, 110,undefined,undefined, undefined, 'FAST'); } else { - doc.addImage(graphImg, 'PNG', 16, 110, pageWidth - 80, 271, undefined,'FAST'); + doc.addImage(graphImg, 'PNG', 16, 110, pageWidth - 80, 271, undefined, 'FAST'); } doc.setFillColor(255, 255, 255); @@ -468,7 +468,7 @@ export const DownloadData = () => { startIcon={} loadingPosition="start" > - Download report from current view (PDF, 1MB) + Download report from current view (PDF, 2MB)