From a8a46e53c7e1733412da4aaf5cb5ebdb0758a16b Mon Sep 17 00:00:00 2001 From: Valentin Date: Tue, 20 Feb 2024 10:30:27 +0100 Subject: [PATCH 1/2] Fixed rendering issue (#425) * removed rendering option to prevent bug on some machines * Bump version --- package.json | 2 +- public/manifest.json | 14 +++++++++----- .../components/imageCanvas/useImageCanvas.jsx | 1 - 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0c80ad22e..436c2be1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "weverify-plugin", - "version": "0.78.0", + "version": "0.78.1", "description": "", "main": "index.js", "scripts": { diff --git a/public/manifest.json b/public/manifest.json index 5655998bc..9d4bfc3ac 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Fake news debunker by InVID & WeVerify", - "version": "0.78.0", + "version": "0.78.1", "description": "InVID WeVerify extension", "short_name": "Verification Plugin", "action": { @@ -11,12 +11,16 @@ "background": { "service_worker": "background.js" }, - "permissions": ["contextMenus", "activeTab"], - "host_permissions": [""], + "permissions": [ + "contextMenus", + "activeTab" + ], + "host_permissions": [ + "" + ], "icons": { "16": "img/icon-16.png", "48": "img/icon-48.png", "128": "img/icon-128.png" - } - + } } diff --git a/src/components/NavItems/tools/Forensic/components/imageCanvas/useImageCanvas.jsx b/src/components/NavItems/tools/Forensic/components/imageCanvas/useImageCanvas.jsx index fc3ade61a..8c47c5c11 100644 --- a/src/components/NavItems/tools/Forensic/components/imageCanvas/useImageCanvas.jsx +++ b/src/components/NavItems/tools/Forensic/components/imageCanvas/useImageCanvas.jsx @@ -32,7 +32,6 @@ const useImageCanvas = ( const context = canvas.getContext("2d", { willReadFrequently: true, - desynchronized: true, }); const image = await preloadImage(imgSrc); From 2131cf0338b5ac4ee7019cb5df2ad64ddfddaa3c Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 22 Mar 2024 17:20:20 +0100 Subject: [PATCH 2/2] Assistant improvements (#442) * Deepfake v4 translation (#387) * Matomo update (#351) * refactoring, added matomo tracking * Pre master (#349) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Matomo update (#353) * refactoring, added matomo tracking * Pre master (#349) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Matomo update (#350) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log * refactoring, added matomo tracking --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Added matomo analytics, fixed lint errors * Fixed layout and bugs --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Removed transition property to fix blank page error * Bumped version * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#371) * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Removed duplicate call, use async await, better error check (#375) * #361 matomo duplicate call at startup (#377) * Feedback email field (#367) (#368) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#370) * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Added new forensics api call * Fixes #361 --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> * Add sensible error messages when assistant fails. (#373) * allow x.com versions of twitter links (#382) Co-authored-by: davidwilby <6062469-davidwilby@users.noreply.gitlab.com> * Upgrade to Forensics API v4 (#385) * Feedback email field (#367) (#368) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#370) * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Added new forensics api call * Fixed typo * Added canvas component, create a mako scale from grayscale images * Enhanced the color scale. Fixed the mask display on hover. Added miniature canvases. Re-added fade animation. Added optional inverted grayscale support. Added optional unprocessed masking. Refactored code. * Fix the popup gif display for the forensic tool * Fixed #363, squashed some bugs, Refactoring * Fixed #363, squashed some bugs, Refactoring * WIP * WIP for CheckGIF * support checkGif with api for url and canvas * canvas big fix 1 * WIP * WIP Fixed bug where height for filter was not set well sometimes * WIP Fixed filter ratio to adjust the ratio to be the same as the original image, cleanup * Refactoring, fixed lint errors * Exclude CMFD filter from using color scale * Fix #381 --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil * package upgrade * User friendly error messages * Display error message if there is no detection result --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou Co-authored-by: Twin Karmakharm Co-authored-by: David Wilby <24752124+davidwilby@users.noreply.github.com> Co-authored-by: davidwilby <6062469-davidwilby@users.noreply.gitlab.com> * Cleanup (#390) * Matomo update (#351) * refactoring, added matomo tracking * Pre master (#349) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Matomo update (#353) * refactoring, added matomo tracking * Pre master (#349) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Matomo update (#350) * Bugfixes + Added tracking (#292) (#293) * rename Feeback * mv2 fix for build * thumbnail * remove console * roll back publicpath * Added trackEvent --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: Valentin Porcellini * Changed dbkf img format (#299) (#300) Co-authored-by: Valentin Porcellini * Bugfixes (#303) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#305) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Pre master (#307) * Changed dbkf img format (#299) Co-authored-by: Valentin Porcellini * DBKF and Thumbnail Fixes (#301) * Changed dbkf img format * Fixed download keyframe URI --------- Co-authored-by: Valentin Porcellini * Prevent tab deletion for reverse search calls (#302) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls --------- Co-authored-by: Valentin Porcellini * Merge fix and cleanup (#304) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue --------- Co-authored-by: Valentin Porcellini * Permission cleanup mv3 (#306) * Changed dbkf img format * Fixed download keyframe URI * Added parameter to prevent tab deletion for app reverse search calls * Deleted mv2 file * Fixed merge issue * Removed unused permission --------- Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini * Update README.md * Update README.md * Update README.md * Update README.md * Added base UI for img results * Added diffusion scores * Refactoring, added video detection methods * Better layout, fixed load state bug, added warning text, rank img detection from highest to lowest, async API calls * bigger detection text * Refactoring * Sort video detection by decreasing detection percentage * Prevent error * auto resize rectangles + refactoring * Added textfield url type * Improved layout, error handling, added tsv support * Fixed issue where the previous video was not replaced with the new video + cleanup * Fixed state issue when submitting a new video after a first one * Layout improvements for better readability * Removed unnecessary header * Fix lint error * Fixed undefined error + better deepfake rectangle layout * add i18n react support * Check if string can be a URL + added error message * Removed fixed height * Added role restriction for FTCN method * (wip) synthetic image tool, added jsconfig, fixed lint errors * change default tsv path * (wip) * Removed diffusion, fixed lint error * Fixed deepfake tool * missing tsv file * sync tansalation * Fixed display issue * Fixed url error msg + added other languages * Fixed url error msg + added other languages (#317) Co-authored-by: Valentin Porcellini * Added unina credits * Added restriction for other tools * Fixes + translations + credits (#318) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools --------- Co-authored-by: Valentin Porcellini * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * Deepfake v4 (#320) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini --------- Co-authored-by: Valentin Porcellini Co-authored-by: Bertrand Goupil * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * Bugfixes (#321) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake --------- Co-authored-by: Bertrand Goupil * matomo update + package upgrade * Matomo tracking + packages upgrade (#323) * Fixed url error msg + added other languages * Added unina credits * Added restriction for other tools * redux keep last process url in textfield * Enhanced UI * externalize role hook * Enhanced UI + refactoring (#319) Co-authored-by: Valentin Porcellini * lens support url * Only show Google Lens if the image is from an URL * add remove button for video deepfake * matomo update + package upgrade --------- Co-authored-by: Bertrand Goupil * increase status request to 3 seconds * Disable Google lens for data blob * fix dattime picker * remove console log * bug fix checkGif loop X advance search date control * geolocate url * Geoloc fix feature * Add detection progess bar * bug fix test if sevice is sending results * bug fix url in error * Revert "Merge branch 'deepfake-v4-translation' into deepfake-v4" This reverts commit c8aa9809d94f1bb8c536a61116067a884c9c0be2, reversing changes made to e04e89cb3bc5a9df26b2fc645e38ff21c7ba61fa. * bug fix GMT disable * remove log * remove log * refactoring, added matomo tracking --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Added matomo analytics, fixed lint errors * Fixed layout and bugs --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou * Removed transition property to fix blank page error * Bumped version * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#371) * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Removed duplicate call, use async await, better error check (#375) * #361 matomo duplicate call at startup (#377) * Feedback email field (#367) (#368) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#370) * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Added new forensics api call * Fixes #361 --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> * Add sensible error messages when assistant fails. (#373) * allow x.com versions of twitter links (#382) Co-authored-by: davidwilby <6062469-davidwilby@users.noreply.gitlab.com> * Upgrade to Forensics API v4 (#385) * Feedback email field (#367) (#368) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * 365 deepfake improve no face detection result parsing (#370) * Feedback email field (#367) * Added email field * Added email keywords * Allow to proceed if the email field is empty * Added label on top of the email field * #365 * Refactored variables. Removed non helping helper popup. Hide clip ui. Added translation * Removed console logs * Added new forensics api call * Fixed typo * Added canvas component, create a mako scale from grayscale images * Enhanced the color scale. Fixed the mask display on hover. Added miniature canvases. Re-added fade animation. Added optional inverted grayscale support. Added optional unprocessed masking. Refactored code. * Fix the popup gif display for the forensic tool * Fixed #363, squashed some bugs, Refactoring * Fixed #363, squashed some bugs, Refactoring * WIP * WIP for CheckGIF * support checkGif with api for url and canvas * canvas big fix 1 * WIP * WIP Fixed bug where height for filter was not set well sometimes * WIP Fixed filter ratio to adjust the ratio to be the same as the original image, cleanup * Refactoring, fixed lint errors * Exclude CMFD filter from using color scale * Fix #381 --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil * package upgrade * User friendly error messages * Display error message if there is no detection result * Fixed lint errors + cleanup --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou Co-authored-by: Twin Karmakharm Co-authored-by: David Wilby <24752124+davidwilby@users.noreply.github.com> Co-authored-by: davidwilby <6062469-davidwilby@users.noreply.gitlab.com> * Added Loccus Audio tool, audio category, updated beta icons * Added CopyIcon shared component * Enhanced local file / url form * Fixed lint warning * Added voice recording keys * refactoring, added text for voice recording * change manifes to 0.78.1 remove hard code version * use integration layer to loccus * Loccus and Semantic Search (#430) * Added Loccus * Added Semantic Search * UI enhancement, refactoring, and bug fixes --------- Co-authored-by: Bertrand Goupil * Loccus enhancements and refactoring (#434) * Added timeout for Loccus + translated timeout message * Refactored the audio and image preprocessing functions into a single function * Refactored the max size for image and audio files and put it in a config file * Changed the Loccus tool logic to reflect the new API changes --------- Co-authored-by: Bertrand Goupil * More 0.79 improvements (#438) * Added new tool and main UI (WIP) * Added pagination, test error message * Fixed lint warning * wip * wip * wip * WIP * filter adm role to extra_feature * Added sort, added language, removed score, refactoring * refactoring + enhanced translation * removed rendering option to prevent bug on some machines * Bump version * refactoring + reset file upload state when closing the results * Reset settings when they change, refactoring, updated gitignore * Fixed lint error for import * Fixed lint errors * Added Loccus footer * Added sorting by relevance and date * Added pagination, language filtering * Fixed pagination, added number of results * Added translation keywords * Fixed footer and navbar * More semantic search enhancements * Fixed onchange error * #427 * Added scroll to top behavior * Fixed dayjs global locale setting * hide expan * Support updated language list, look for dupes, and look for dupe keys for the filtering * fixed lint warning * removed console.log * bug fix & refactor navbar and allTools * set item orders in navbar * Enhanced scroll to top, open links in a new tab * Do not show translation option to english if the language is english * bumped version * 0.79.0 next release number * #409 add crossorign to display image * Display the second gauge to users with the extra_feature role * bug fix navigation * remove log * #412 * Updated textfield placeholder * Added translations * add extra_feature to by pass * Fix to support new Loccus API changes + added missing translation * Refactored file size limit + Loccus cleanup * Refactored image and audio upload preprocessing functions * Added missing keyword * Fixed lint errors * Added Loccus timeout * fix language load for semantic search * Added Login at the top of the Navbar * Added audio waveform, fixed copy/paste message, removed message for loccus recording detection * Fixed lint warnings and errors * Improved responsiveness of the top bar * Fixed filtering error * Fixed Zero filter * Cleanup * Fixed warning severity --------- Co-authored-by: Bertrand Goupil * More new tools improvements (#439) * Added new tool and main UI (WIP) * Added pagination, test error message * Fixed lint warning * wip * wip * wip * WIP * filter adm role to extra_feature * Added sort, added language, removed score, refactoring * refactoring + enhanced translation * removed rendering option to prevent bug on some machines * Bump version * refactoring + reset file upload state when closing the results * Reset settings when they change, refactoring, updated gitignore * Fixed lint error for import * Fixed lint errors * Added Loccus footer * Added sorting by relevance and date * Added pagination, language filtering * Fixed pagination, added number of results * Added translation keywords * Fixed footer and navbar * More semantic search enhancements * Fixed onchange error * #427 * Added scroll to top behavior * Fixed dayjs global locale setting * hide expan * Support updated language list, look for dupes, and look for dupe keys for the filtering * fixed lint warning * removed console.log * bug fix & refactor navbar and allTools * set item orders in navbar * Enhanced scroll to top, open links in a new tab * Do not show translation option to english if the language is english * bumped version * 0.79.0 next release number * #409 add crossorign to display image * Display the second gauge to users with the extra_feature role * bug fix navigation * remove log * #412 * Updated textfield placeholder * Added translations * add extra_feature to by pass * Fix to support new Loccus API changes + added missing translation * Refactored file size limit + Loccus cleanup * Refactored image and audio upload preprocessing functions * Added missing keyword * Fixed lint errors * Added Loccus timeout * fix language load for semantic search * Added Login at the top of the Navbar * Added audio waveform, fixed copy/paste message, removed message for loccus recording detection * Fixed lint warnings and errors * Improved responsiveness of the top bar * Fixed filtering error * Fixed Zero filter * Cleanup * Fixed warning severity * Added accordion UI * Added accordion summary translation --------- Co-authored-by: Bertrand Goupil * Assistant/extractedurls add domaincredibility (#429) * #82 adding URL domain analysis to extracted URLs * fixed bug with links not displaying when source cred fails * #82 sending batches of URLs to UDA service * added missing exit condition for batch calls * changed to links.length * fixed variables named causing dialog to not show * changes to the extracted url keywords * Add and render html text generated from generic site scraping (#436) --------- Co-authored-by: AFPMedialab <40788591+AFPMedialab@users.noreply.github.com> Co-authored-by: Bertrand Goupil Co-authored-by: dteyssou Co-authored-by: Twin Karmakharm Co-authored-by: David Wilby <24752124+davidwilby@users.noreply.github.com> Co-authored-by: davidwilby <6062469-davidwilby@users.noreply.gitlab.com> Co-authored-by: Goupil Conseil Co-authored-by: Rosanna Milner <44234896+rosannamilner@users.noreply.github.com> --- .../AssistantTextResult.jsx | 12 +- .../AssistantScrapeResults/assistantUtils.jsx | 103 ++++++++++++++++++ src/redux/actions/tools/assistantActions.jsx | 10 +- src/redux/reducers/assistantReducer.jsx | 2 + src/redux/sagas/assistantSaga.jsx | 5 + 5 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 src/components/NavItems/Assistant/AssistantScrapeResults/assistantUtils.jsx diff --git a/src/components/NavItems/Assistant/AssistantScrapeResults/AssistantTextResult.jsx b/src/components/NavItems/Assistant/AssistantScrapeResults/AssistantTextResult.jsx index 537ea60e2..b7605b61a 100644 --- a/src/components/NavItems/Assistant/AssistantScrapeResults/AssistantTextResult.jsx +++ b/src/components/NavItems/Assistant/AssistantScrapeResults/AssistantTextResult.jsx @@ -24,6 +24,7 @@ import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace import useMyStyles from "../../../Shared/MaterialUiStyles/useMyStyles"; import IconButton from "@mui/material/IconButton"; import FileCopyOutlined from "@mui/icons-material/FileCopy"; +import { treeMapToElements } from "./assistantUtils"; const AssistantTextResult = () => { const keyword = i18nLoadNamespace("components/NavItems/tools/Assistant"); @@ -35,6 +36,8 @@ const AssistantTextResult = () => { // assistant media states const text = useSelector((state) => state.assistant.urlText); const textLang = useSelector((state) => state.assistant.textLang); + const textHtmlMap = useSelector((state) => state.assistant.urlTextHtmlMap); + const [textHtmlOutput, setTextHtmlOutput] = useState(null); // third party check states const dbkfMatch = useSelector((state) => state.assistant.dbkfTextMatch); @@ -58,6 +61,10 @@ const AssistantTextResult = () => { if (elementToCheck.offsetHeight < elementToCheck.scrollHeight) { setDisplayExpander(true); } + + if (textHtmlMap !== null) { + setTextHtmlOutput(treeMapToElements(text, textHtmlMap)); + } }, [textBox]); return ( @@ -102,8 +109,9 @@ const AssistantTextResult = () => { - - {!displayOrigLang && translatedText ? translatedText : text} + {/*{!displayOrigLang && translatedText ? translatedText : text}*/} + {textHtmlOutput && textHtmlOutput} + {!textHtmlOutput && text} diff --git a/src/components/NavItems/Assistant/AssistantScrapeResults/assistantUtils.jsx b/src/components/NavItems/Assistant/AssistantScrapeResults/assistantUtils.jsx new file mode 100644 index 000000000..8d4ca694a --- /dev/null +++ b/src/components/NavItems/Assistant/AssistantScrapeResults/assistantUtils.jsx @@ -0,0 +1,103 @@ +import React from "react"; + +function treeMapToElementsRecursive( + text, + treeElem, + spanHighlightIndices = null, + wrapFunc = null, +) { + let childElems = []; + if ("span" in treeElem) { + const span = treeElem.span; + if (spanHighlightIndices === null) { + console.log("No span highlight: ", text.substring(span.start, span.end)); + childElems.push(text.substring(span.start, span.end)); + } else { + console.log("Span highlight: ", text.substring(span.start, span.end)); + let currentIndex = span.start; + for (let i = 0; i < spanHighlightIndices.length; i++) { + const hSpan = spanHighlightIndices[i]; + console.log( + "Matching span", + span.start, + span.end, + hSpan.indices[0], + hSpan.indices[1], + ); + const hSpanStart = hSpan.indices[0]; + const hSpanEnd = hSpan.indices[1]; + if ( + (span.start <= hSpanStart && hSpanStart <= span.end) || + (span.start <= hSpanEnd && hSpanEnd <= span.end) + ) { + //If there's an overlap + console.log( + "Found lapping span ", + span.start, + span.end, + hSpanStart, + hSpanEnd, + ); + + // If span doesn't start before the current index + if (hSpanStart > currentIndex) { + childElems.push(text.substring(currentIndex, hSpanStart)); + } + + const boundedStart = + hSpanStart < span.start ? span.start : hSpanStart; + const boundedEnd = hSpanEnd > span.end ? span.end : hSpanEnd; + if (wrapFunc) { + console.log("Wrapping: ", text.substring(boundedStart, boundedEnd)); + childElems.push( + wrapFunc(text.substring(boundedStart, boundedEnd), hSpan), + ); + } else { + console.log( + "Not wrapping: ", + text.substring(boundedStart, boundedEnd), + ); + childElems.push(text.substring(boundedStart, boundedEnd)); + } + + currentIndex = boundedEnd; + } + } + + // Append the rest of text + if (currentIndex < span.end) { + childElems.push(text.substring(currentIndex, span.end)); + } + } + } + + for (let i = 0; i < treeElem.children.length; i++) { + childElems.push( + treeMapToElementsRecursive( + text, + treeElem.children[i], + spanHighlightIndices, + wrapFunc, + ), + ); + } + return React.createElement(treeElem.tag, null, childElems); +} + +export const treeMapToElements = ( + text, + mapping, + spanHighlightIndices = null, + wrapFunc = null, +) => { + if (mapping) { + return treeMapToElementsRecursive( + text, + mapping, + spanHighlightIndices, + wrapFunc, + ); + } else { + return text; + } +}; diff --git a/src/redux/actions/tools/assistantActions.jsx b/src/redux/actions/tools/assistantActions.jsx index 247987e39..5c8f59886 100644 --- a/src/redux/actions/tools/assistantActions.jsx +++ b/src/redux/actions/tools/assistantActions.jsx @@ -55,7 +55,14 @@ export const setProcessUrl = (processUrl, processUrlType) => { }; }; -export const setScrapedData = (text, lang, links, images, videos) => { +export const setScrapedData = ( + text, + lang, + links, + images, + videos, + textHtmlMap, +) => { return { type: "SET_SCRAPED_DATA", payload: { @@ -64,6 +71,7 @@ export const setScrapedData = (text, lang, links, images, videos) => { linkList: links, imageList: images, videoList: videos, + urlTextHtmlMap: textHtmlMap, }, }; }; diff --git a/src/redux/reducers/assistantReducer.jsx b/src/redux/reducers/assistantReducer.jsx index 6ee129e99..55a0b70e1 100644 --- a/src/redux/reducers/assistantReducer.jsx +++ b/src/redux/reducers/assistantReducer.jsx @@ -10,6 +10,7 @@ const defaultState = { videoList: [], linkList: [], urlText: null, + urlTextHtmlMap: null, textLang: null, processUrlActions: [], processUrlType: null, @@ -83,6 +84,7 @@ const assistantReducer = (state = defaultState, action) => { videoList: [], linkList: [], urlText: null, + urlTextHtmlMap: null, textLang: null, processUrlActions: [], processUrlType: null, diff --git a/src/redux/sagas/assistantSaga.jsx b/src/redux/sagas/assistantSaga.jsx index 9a41951d8..fd516e713 100644 --- a/src/redux/sagas/assistantSaga.jsx +++ b/src/redux/sagas/assistantSaga.jsx @@ -438,6 +438,7 @@ function* handleAssistantScrapeCall(action) { filteredSR.linkList, filteredSR.imageList, filteredSR.videoList, + filteredSR.urlTextHtmlMap, ), ); yield put(setAssistantLoading(false)); @@ -591,7 +592,9 @@ const filterAssistantResults = ( let imageList = []; let linkList = []; let urlText = null; + let urlTextHtmlMap = null; let textLang = null; + switch (urlType) { case KNOWN_LINKS.YOUTUBE: case KNOWN_LINKS.LIVELEAK: @@ -660,6 +663,7 @@ const filterAssistantResults = ( linkList = scrapeResult.links .sort() .filter((value, index, array) => array.indexOf(value) === index); + urlTextHtmlMap = scrapeResult.text_html_mapping; } return { @@ -668,6 +672,7 @@ const filterAssistantResults = ( videoList: videoList, imageList: imageList, linkList: linkList, + urlTextHtmlMap: urlTextHtmlMap, }; };