Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration issue 727 #733

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The Verification plugin is a browser based plugin built with React and Redux.
REACT_APP_DBKF_SEARCH_API=<dbkf_url>
REACT_APP_DBKF_SIMILARITY_API=<dbkf_similarity_url>
REACT_APP_BASEURL=<baseurl>
REACT_APP_WRAPPER=<wrapper_url>
REACT_APP_CAA_FORENSICS_URL=<forensics_url>
REACT_APP_CAA_ANALYSIS_URL=<analysis_url>
REACT_APP_CAA_ENVISU4_UTILS_URL=<envisu4_url>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weverify-plugin",
"version": "0.84",
"version": "0.85",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Fake news debunker by InVID & WeVerify",
"version": "0.84",
"version": "0.85",
"description": "InVID WeVerify extension",
"short_name": "Verification Plugin",
"action": {
Expand Down
6 changes: 2 additions & 4 deletions src/components/NavItems/tools/C2pa/C2pa.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ArrowDownward } from "@mui/icons-material";

import HeaderTool from "components/Shared/HeaderTool/HeaderTool";
import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace";
import useMyStyles from "components/Shared/MaterialUiStyles/useMyStyles";
import StringFileUploadField from "components/Shared/StringFileUploadField";
import exifr from "exifr";
import {
Expand Down Expand Up @@ -62,8 +61,6 @@ const C2paData = () => {

const dispatch = useDispatch();

const classes = useMyStyles();

const keyword = i18nLoadNamespace("components/NavItems/tools/C2pa");

const [errorMessage, setErrorMessage] = useState(null);
Expand Down Expand Up @@ -115,6 +112,7 @@ const C2paData = () => {
try {
res = await authenticatedRequest(config);
} catch (error) {
console.log(error);
setErrorMessage(keyword("error_message_reverse_search_generic"));
return;
}
Expand Down Expand Up @@ -206,7 +204,7 @@ const C2paData = () => {
method: "get",
responseType: "blob",
maxBodyLength: Infinity,
url: `https://plugin-archiving.afp.com/gateway/c2paafp${urls.thumbnailUrl}`,
url: `${serverUrl}${urls.thumbnailUrl}`,
headers: {
"X-AFP-TRANSACTION-ID": getTransactionId(),
},
Expand Down
10 changes: 6 additions & 4 deletions src/components/NavItems/tools/Gif/Hooks/useGetGif.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { useEffect } from "react";
import { useDispatch } from "react-redux";
import { setError } from "redux/reducers/errorReducer";

import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace";
import { saveAs } from "file-saver";
import { setError } from "redux/reducers/errorReducer";

import {
setStateDownloading,
setStateBackResults,
setStateDownloading,
} from "../../../../../redux/reducers/tools/gifReducer";
import { saveAs } from "file-saver";
import useAuthenticatedRequest from "../../../../Shared/Authentication/useAuthenticatedRequest";

const useGetGif = (
Expand All @@ -19,7 +21,7 @@ const useGetGif = (
const keyword = i18nLoadNamespace("components/NavItems/tools/Forensic");
const dispatch = useDispatch();
const authenticatedRequest = useAuthenticatedRequest();
const baseURL = process.env.REACT_APP_BASEURL;
const baseURL = process.env.REACT_APP_WRAPPER;

useEffect(() => {
const handleError = (e) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";

import { setError } from "redux/reducers/errorReducer";

import {
setStateError,
setStateLoading,
setStateShow,
} from "../../../../../redux/reducers/tools/gifReducer";
import { setError } from "redux/reducers/errorReducer";
import useAuthenticatedRequest from "../../../../Shared/Authentication/useAuthenticatedRequest";

const useGetHomographics = (files, mode, keyword) => {
const dispatch = useDispatch();
const toolState = useSelector((state) => state.gif.toolState);
const baseURL = process.env.REACT_APP_BASEURL;
const baseURL = process.env.REACT_APP_WRAPPER;

const authenticatedRequest = useAuthenticatedRequest();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ export const itwRineMever = new SyntheticImageDetectionAlgorithm(
[ROLES.EVALUATION, ROLES.EXTRA_FEATURE],
);

export const itwSpaiMever = new SyntheticImageDetectionAlgorithm(
"itw_spai_mever",
"synthetic_image_detection_itw_spai_mever_name",
"synthetic_image_detection_itw_spai_mever_description",
[ROLES.EVALUATION, ROLES.EXTRA_FEATURE],
);

/**
* The list of the synthetic image detection algorithms
* TODO:Use SET
Expand All @@ -121,6 +128,7 @@ export const syntheticImageDetectionAlgorithms = [
proGanRineMever,
ldmRineMever,
itwRineMever,
itwSpaiMever,
];

/**
Expand Down